linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagi@grimberg.me>
To: linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>
Subject: [PATCH rfc 1/2] fabrics: add fabrics_ prefix to fabrics operations
Date: Tue, 24 Mar 2020 02:03:23 -0700	[thread overview]
Message-ID: <20200324090324.24459-2-sagi@grimberg.me> (raw)
In-Reply-To: <20200324090324.24459-1-sagi@grimberg.me>

discover/connect/disconnect are generic names which might
clash with other external included libraries.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 fabrics.c |  8 ++++----
 fabrics.h |  8 ++++----
 nvme.c    | 10 +++++-----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fabrics.c b/fabrics.c
index e2c9bfb37177..a7d628b1f0c9 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -1251,7 +1251,7 @@ out:
 	return ret;
 }
 
-int discover(const char *desc, int argc, char **argv, bool connect)
+int fabrics_discover(const char *desc, int argc, char **argv, bool connect)
 {
 	char argstr[BUF_SIZE];
 	int ret;
@@ -1306,7 +1306,7 @@ out:
 	return nvme_status_to_errno(ret, true);
 }
 
-int connect(const char *desc, int argc, char **argv)
+int fabrics_connect(const char *desc, int argc, char **argv)
 {
 	char argstr[BUF_SIZE];
 	int instance, ret;
@@ -1439,7 +1439,7 @@ static int disconnect_by_device(char *device)
 	return remove_ctrl(instance);
 }
 
-int disconnect(const char *desc, int argc, char **argv)
+int fabrics_disconnect(const char *desc, int argc, char **argv)
 {
 	const char *nqn = "nqn name";
 	const char *device = "nvme device";
@@ -1484,7 +1484,7 @@ out:
 	return nvme_status_to_errno(ret, true);
 }
 
-int disconnect_all(const char *desc, int argc, char **argv)
+int fabrics_disconnect_all(const char *desc, int argc, char **argv)
 {
 	struct nvme_topology t = { };
 	int i, j, err;
diff --git a/fabrics.h b/fabrics.h
index b8e53f492b53..f5b8eaf6bba0 100644
--- a/fabrics.h
+++ b/fabrics.h
@@ -5,9 +5,9 @@
 
 extern char *hostnqn_read(void);
 
-extern int discover(const char *desc, int argc, char **argv, bool connect);
-extern int connect(const char *desc, int argc, char **argv);
-extern int disconnect(const char *desc, int argc, char **argv);
-extern int disconnect_all(const char *desc, int argc, char **argv);
+extern int fabrics_discover(const char *desc, int argc, char **argv, bool connect);
+extern int fabrics_connect(const char *desc, int argc, char **argv);
+extern int fabrics_disconnect(const char *desc, int argc, char **argv);
+extern int fabrics_disconnect_all(const char *desc, int argc, char **argv);
 
 #endif
diff --git a/nvme.c b/nvme.c
index dd3ab5870e62..7e6713a1c8c7 100644
--- a/nvme.c
+++ b/nvme.c
@@ -4779,31 +4779,31 @@ static int show_hostnqn_cmd(int argc, char **argv, struct command *command, stru
 static int discover_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
 {
 	const char *desc = "Send Get Log Page request to Discovery Controller.";
-	return discover(desc, argc, argv, false);
+	return fabrics_discover(desc, argc, argv, false);
 }
 
 static int connect_all_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
 {
 	const char *desc = "Discover NVMeoF subsystems and connect to them";
-	return discover(desc, argc, argv, true);
+	return fabrics_discover(desc, argc, argv, true);
 }
 
 static int connect_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
 {
 	const char *desc = "Connect to NVMeoF subsystem";
-	return connect(desc, argc, argv);
+	return fabrics_connect(desc, argc, argv);
 }
 
 static int disconnect_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
 {
 	const char *desc = "Disconnect from NVMeoF subsystem";
-	return disconnect(desc, argc, argv);
+	return fabrics_disconnect(desc, argc, argv);
 }
 
 static int disconnect_all_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
 {
 	const char *desc = "Disconnect from all connected NVMeoF subsystems";
-	return disconnect_all(desc, argc, argv);
+	return fabrics_disconnect_all(desc, argc, argv);
 }
 
 void register_extension(struct plugin *plugin)
-- 
2.20.1


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-03-24  9:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24  9:03 [PATCH rfc 0/2] support ip resolution with hostnames Sagi Grimberg
2020-03-24  9:03 ` Sagi Grimberg [this message]
2020-03-24  9:03 ` [PATCH rfc 2/2] fabrics: allow user to pass hostname instead of traddr Sagi Grimberg
2020-03-24  9:46   ` Max Gurtovoy
2020-03-24 16:21     ` Sagi Grimberg
2020-03-24 17:24       ` Max Gurtovoy
2020-03-24 19:11         ` Sagi Grimberg
2020-03-24 22:57           ` Max Gurtovoy
2020-04-01 19:39   ` Keith Busch
2020-04-01 20:33     ` Sagi Grimberg
2020-04-01 20:43       ` Keith Busch
2020-03-24  9:06 ` [PATCH rfc 0/2] support ip resolution with hostnames Sagi Grimberg
2020-04-01  6:03 ` Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200324090324.24459-2-sagi@grimberg.me \
    --to=sagi@grimberg.me \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).