archive mirror
 help / color / mirror / Atom feed
	"Javier González" <>,
Subject: [PATCH V6 0/2] nvme: enable char device per namespace
Date: Mon,  1 Mar 2021 20:24:50 +0100	[thread overview]
Message-ID: <> (raw)

From: Javier González <>

These two patches enable a char device per namespace, also through
multipath. It is possible to test this in QEMU using Keith's and Klaus'
tree in nvme-next

One question that came up while preparing V6 is what to do with the bdev
sysfs entries when the block device fails. On the one hand, these values
are useful for the char device, but on the other, they are in principle
only valid for the block device. We have 3 options: (i) clear sysfs when
bdev fails and require user-space to query the nvme device directly
through sysfs, (ii) maintain the bdev sysfs entries, and (iii) make char
device dedicated sysfs entries, which might be redundant when both the
char device and the block device are brought up. Thoughts?

Keith: Regarding nvme-cli support, once this is in place, we will send a
patch to nvme-cli so that this device is shown in verbose mode. Do you
have anu thoughts about this?

Changes since V5
  - Addressed style and naming comments from Christoph
  - Change the logic around nvme_update_ns_info() to (i) make the
    GENHD_FL_HIDDEN more explicit in the init logic, and (ii) to support
    an error path that also stops the char device from being created.
    This error path is not exercised currently.

Changes since V4
  - Added support for multipath (from Minwoo)
  - Fixed typo in commit message for sysfs naming
  - Rebase into nvme-5.12

Changes since V3
  - Use a dedicated ida for the generic handle
  - Do not abort namespace greation if the generic handle fails

Changes since V2:
  - Apply a number of naming and code structure improvements (from
  - Use i_cdev to pull struct nvme_ns in the ioctl path instead of
    populating file->private_data (from Christoph)
  - Change char device and sysfs entries to /dev/nvme-generic-XcYnZ to
    follow the hidden device naming scheme (from Christoph and Keith)

Changes since V1:
  - Remove patches 1-3 which are already picked up by Christoph
  - Change the char device and sysfs entries to nvmeXnYc / c signals
    char device
  - Address Minwoo's comments on inline functions and style

Javier González (1):
  nvme: enable char device per namespace

Minwoo Im (1):
  nvme: allow open for nvme-generic char device

 drivers/nvme/host/core.c | 198 ++++++++++++++++++++++++++++++++++-----
 drivers/nvme/host/nvme.h |   5 +
 2 files changed, 182 insertions(+), 21 deletions(-)


Linux-nvme mailing list

             reply	other threads:[~2021-03-01 19:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 19:24 javier [this message]
2021-03-01 19:24 ` [PATCH V6 1/2] nvme: enable char device per namespace javier
2021-03-03  9:10   ` Christoph Hellwig
2021-03-03 10:02     ` Javier González
2021-03-09 11:31       ` Christoph Hellwig
2021-03-09 12:42         ` Javier González
2021-03-09 15:05           ` Christoph Hellwig
2021-03-09 21:18             ` Javier González
2021-03-24 12:29   ` Niklas Cassel
2021-03-25  2:09     ` Minwoo Im
2021-03-25  8:26       ` hch
2021-03-25  8:39         ` Niklas Cassel
2021-03-25  9:34           ` Minwoo Im
2021-03-25 12:25   ` Niklas Cassel
2021-03-25 12:33     ` Minwoo Im
2021-03-25 15:14     ` Keith Busch
2021-03-01 19:24 ` [PATCH V6 2/2] nvme: allow open for nvme-generic char device javier

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* 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).