All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>,
	linux-nvme@lists.infradead.org, util-linux@vger.kernel.org,
	Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Subject: Re: [PATCH] nvme: add namespace paths links
Date: Tue, 5 Apr 2022 11:51:19 +0200	[thread overview]
Message-ID: <0d53d5cb-a22d-c620-1a35-1ab408e0f747@suse.de> (raw)
In-Reply-To: <b997ceac-a391-cc5a-a397-0d68f91736eb@grimberg.me>

On 4/5/22 10:34, Sagi Grimberg wrote:
> 
>>>>> It is really annoying to always have to loop through the entire
>>>>> /sys/block directory just to find the namespace path links for
>>>>> a single namespace in libnvme/nvme-cli.
>>>>> So provide links to the namespace paths for efficient lookup.
>>>>
>>>> I think having some form of links would be useful.  Quite a while ago
>>>> Thadeu looked into adding some form of relationship for lsblk and
>>>> friends.  Maybe it would be good to sync up and make sure whatever
>>>> links we are adding would be useful for all users?
>>>>
>>> Care to elaborate?
>>> Using the block device name is the most straightforward way here; we 
>>> don't
>>> have a good enumeration to leverage as the paths are essentially just a
>>> linked list.
>>>
>>> We sure can have a subdirectory 'paths', and stick the links in there.
>>> If that helps with lsblk ...
>>
>> I personally don't care.  But I've added Thadeu and the util-linux list
>> to get everyone on board.
> 
> Why not stick to slaves/ like the device mapper?

Because:

/**
  * bd_link_disk_holder - create symlinks between holding disk and slave 
bdev
  * @bdev: the claimed slave bdev
  * @disk: the holding disk
  *
  * DON'T USE THIS UNLESS YOU'RE ALREADY USING IT.
  *

Not sure _why_ it's there, but it is there.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer

  reply	other threads:[~2022-04-05 11:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  9:28 [PATCH] nvme: add namespace paths links Hannes Reinecke
2022-04-05  5:42 ` Christoph Hellwig
2022-04-05  5:46   ` Hannes Reinecke
2022-04-05  5:48     ` Christoph Hellwig
2022-04-05  8:34       ` Sagi Grimberg
2022-04-05  9:51         ` Hannes Reinecke [this message]
2022-04-05 10:22           ` Sagi Grimberg
2022-04-25 13:54       ` Karel Zak
2022-07-29 11:43         ` Hannes Reinecke
2023-09-08  6:57 Hannes Reinecke
2023-09-12 11:43 ` Sagi Grimberg
2023-09-12 11:51   ` Hannes Reinecke
2023-09-12 12:55     ` Sagi Grimberg
2023-09-12 14:04       ` Hannes Reinecke
2023-12-04 10:25         ` Sagi Grimberg
2023-12-04 11:19           ` Hannes Reinecke
2023-12-04 11:58             ` Sagi Grimberg
2023-12-08 15:34               ` Daniel Wagner

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=0d53d5cb-a22d-c620-1a35-1ab408e0f747@suse.de \
    --to=hare@suse.de \
    --cc=cascardo@canonical.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=util-linux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.