linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvme-topology: have list-subsys print only controllers with attached namespace
Date: Mon, 15 Mar 2021 21:13:45 +0000	[thread overview]
Message-ID: <BYAPR04MB496584078ED56F2D5FD0BFF7866C9@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210315205209.352846-1-sagi@grimberg.me

On 3/15/21 14:01, Sagi Grimberg wrote:
> When running list-subsys on a specific namespace, we output all the
> controllers that belong to the subsystem regardless if the requested
> namespace is actually attached to them.
>
> Example:
> $ nvme list-subsys /dev/nvme0n1
> nvme-subsys0 - NQN=nqn.2016-01.com.lightbitslabs:uuid:07cfffe6-5a4f-4151-b663-e13cf835609b
> \
>  +- nvme0 tcp traddr=10.113.5.1 trsvcid=4420 live optimized
>  +- nvme1 tcp traddr=10.133.3.1 trsvcid=4420 live
>  +- nvme2 tcp traddr=10.133.1.1 trsvcid=4420 live
>  +- nvme3 tcp traddr=10.113.1.1 trsvcid=4420 live inaccessible
>  +- nvme4 tcp traddr=10.133.5.1 trsvcid=4420 live
>  +- nvme5 tcp traddr=10.113.4.1 trsvcid=4420 live
>  +- nvme6 tcp traddr=10.133.4.1 trsvcid=4420 live
>  +- nvme7 tcp traddr=10.113.2.1 trsvcid=4420 live
>  +- nvme8 tcp traddr=10.133.2.1 trsvcid=4420 live
>  +- nvme9 tcp traddr=10.113.3.1 trsvcid=4420 live
>
> This output is somewhat confusing and makes the user think the namespace
> is actually attached to all of these controllers, instead we want the
> output which provided by the change introduced here:
>
> $ nvme list-subsys /dev/nvme0n1
> nvme-subsys0 - NQN=nqn.2016-01.com.lightbitslabs:uuid:07cfffe6-5a4f-4151-b663-e13cf835609b
> \
>  +- nvme0 tcp traddr=10.113.5.1 trsvcid=4420 live optimized
>  +- nvme3 tcp traddr=10.113.1.1 trsvcid=4420 live inaccessible
>
> Do the same trick as we do in scan_subsystems, we add the ctrl to the
> topology if either ns_instance wasn't passed (see all controllers) or
> it was pased _and_ the controller has this namespace is attached to
> the controller (to do that we add nsid down the call chain for that).
>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>

This is much clear than what we have currently, looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>






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

  reply	other threads:[~2021-03-15 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 20:52 [PATCH] nvme-topology: have list-subsys print only controllers with attached namespace Sagi Grimberg
2021-03-15 21:13 ` Chaitanya Kulkarni [this message]
2021-03-15 21:40   ` Keith Busch

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=BYAPR04MB496584078ED56F2D5FD0BFF7866C9@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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).