From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/3] nvmet: Make cntlid globally unique
Date: Mon, 5 Dec 2016 16:34:00 +0100 [thread overview]
Message-ID: <20161205153400.GA6529@lst.de> (raw)
In-Reply-To: <1480936146-6406-3-git-send-email-sagi@grimberg.me>
On Mon, Dec 05, 2016@01:09:05PM +0200, Sagi Grimberg wrote:
> We usually log the cntlid which is confusing in case
> we have multiple subsystems each with it's own cntlid ida.
> Instead make cntlid ida globally unique and log the initial
> association.
>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> drivers/nvme/target/core.c | 10 ++++------
> drivers/nvme/target/fabrics-cmd.c | 4 ++--
> drivers/nvme/target/nvmet.h | 1 -
> 3 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
> index 4a367549eb93..cee26ddc47bb 100644
> --- a/drivers/nvme/target/core.c
> +++ b/drivers/nvme/target/core.c
> @@ -18,6 +18,7 @@
>
> static struct nvmet_fabrics_ops *nvmet_transports[NVMF_TRTYPE_MAX];
>
> +static DEFINE_IDA(cntlid_ida);
> /*
How about moving the empty line after this declaration instead of before?
> + pr_info("creating controller %d for subsystem %s for NQN %s.\n",
> + ctrl->cntlid, ctrl->subsys->subsysnqn, ctrl->hostnqn);
That's going to be a crazy long line in the dmesg log..
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch at lst.de>
next prev parent reply other threads:[~2016-12-05 15:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 11:09 [PATCH 0/3] some useful fabrics patches Sagi Grimberg
2016-12-05 11:09 ` [PATCH 1/3] nvmet: delete controllers deletion upon subsystem release Sagi Grimberg
2016-12-05 11:39 ` Johannes Thumshirn
2016-12-05 14:08 ` Max Gurtovoy
2016-12-05 15:40 ` Christoph Hellwig
2016-12-05 17:08 ` Sagi Grimberg
2016-12-06 8:28 ` Christoph Hellwig
2016-12-05 11:09 ` [PATCH 2/3] nvmet: Make cntlid globally unique Sagi Grimberg
2016-12-05 11:38 ` Johannes Thumshirn
2016-12-05 14:08 ` Max Gurtovoy
2016-12-05 15:34 ` Christoph Hellwig [this message]
2016-12-05 17:06 ` Sagi Grimberg
2016-12-06 8:28 ` Christoph Hellwig
2016-12-06 23:23 ` J Freyensee
2016-12-05 11:09 ` [PATCH 3/3] nvme: Make controller state visible via sysfs Sagi Grimberg
2016-12-05 11:37 ` Johannes Thumshirn
2016-12-05 14:15 ` Max Gurtovoy
2016-12-05 17:05 ` Sagi Grimberg
2016-12-05 15:37 ` Christoph Hellwig
2016-12-05 17:06 ` 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=20161205153400.GA6529@lst.de \
--to=hch@lst.de \
/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).