Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH] NVMe: Expose namespace unique identifier to sysfs
Date: Tue, 8 Dec 2015 15:11:29 -0800	[thread overview]
Message-ID: <20151208231129.GA21463@infradead.org> (raw)
In-Reply-To: <20151208191555.GB16241@localhost.localdomain>

On Tue, Dec 08, 2015@07:15:55PM +0000, Keith Busch wrote:
> > I don't understand why we want to produce a binary attribute here instead
> > of a text attribute?  We already have nicely-formatted UUIDs in sysfs
> > (see the %pU specifier to printk)
> 
> I don't have a strong opinion here. Just copying scsi vpd83 attribute,
> and thought it's easier for a program to consume as binary, and easy to
> read from the shell with hexdump.

SCSI is a bad example.  James insisted we should not parse the EVPD
pages in kernel space for reasons no one agreed to (and now we'll need
to add that for in-kernel consumers anyway).  So unless some userspace
absolutely needs to do it the same way it might be better to offer a
ASCII representation.

> > I don't think we should have one attribute that might be an eui64 or might
> > be a uuid.  Maybe we should produce either an eui64 or a uuid attribute,
> > depending on which one the device reports?
> 
> Sure, sounds reasonable.
> 
> These are supposed to be consumed by userspace to do something useful,
> but I'm not getting much direction (I don't know why they insist on
> these being available in sysfs instead of using existing ioctl).

Using pass through ioctls from udev has been really painful from SCSI,
mostly in multipath environments or with flakey USB devices where we'd
need to extend a lot of magic done in the SCSI layer to those userspace
callers to get everything right.  NVMe is probably doing better in
that respect at the moment, but I'm not going to take any bets that
it's going to remain that way.

> I've no problem dynamically providing these based on device capabilities.
> Hopefully the user space is okay with looking for the presense of two
> different files.

An alternative might be to show the type of ID if we're using a text
format, but that sounds fairly ugly as well.

  parent reply	other threads:[~2015-12-08 23:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 17:26 [PATCH] NVMe: Expose namespace unique identifier to sysfs Keith Busch
2015-12-08 18:53 ` Matthew Wilcox
2015-12-08 19:15   ` Keith Busch
2015-12-08 19:25     ` Jon Derrick
2015-12-08 23:11     ` Christoph Hellwig [this message]
2015-12-09  8:12     ` Dan Williams

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=20151208231129.GA21463@infradead.org \
    --to=hch@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