public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* How to look up an ns cdev from block maj:min?
@ 2023-02-14 21:27 Stefan Hajnoczi
  2023-02-15  8:41 ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2023-02-14 21:27 UTC (permalink / raw)
  To: linux-nvme

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Hi,
Is there an official way for userspace to look up an ns cdev from a
block maj:min?

For example, how should a userspace program determine that /dev/ng0n1 is
the corresponding ns cdev when given just the block device node
/dev/nvme0n1?

Parsing the filename is an obvious option but it makes assumptions about
the naming convention of both the block device node and the character
device node.

Is there a better way via sysfs? (I couldn't find it.)

Thanks,
Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-15 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 21:27 How to look up an ns cdev from block maj:min? Stefan Hajnoczi
2023-02-15  8:41 ` Sagi Grimberg
2023-02-15  9:56   ` Daniel Wagner
2023-02-15 10:09     ` Daniel Wagner
2023-02-15 15:51   ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox