linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 3/6] nvme: claim block devices
Date: Wed, 4 Oct 2017 09:13:12 +0200	[thread overview]
Message-ID: <20171004071312.GA21143@lst.de> (raw)
In-Reply-To: <19dbdf11-86c4-b6ea-a18c-a78fcae822d5@suse.de>

On Wed, Oct 04, 2017@08:33:07AM +0200, Hannes Reinecke wrote:
> > On Wed, Oct 04, 2017@07:42:00AM +0200, Hannes Reinecke wrote:
> >> Hmm. Not sure how you would be doing that. Who should be doing the
> >> claiming? Typically the claim is done whenever a device is created on
> >> top of the other...
> > 
> > We'd need a callback in the driver if it is claimed, and use that
> > to for propagating the claim, or use a shared struture to record the
> > claim.  I haven't looked into the details yet, though.
> > 
> >> What about an alternative plan: make creation of the subsystem device
> >> fully dynamic.
> >> But if a subsystem device is created it will always claim the underlying
> >> device. Then we can make the creation dependent on the NMIC attribute,
> >> and existing setups would not be affected.
> > 
> > This doesn't work because a lot of devices can just set NMIC.  E.g.
> > every namespace exported by the Linux NVMe target.
> > 
> But as it's fully dynamic we can decide how to handle each device on a
> device-by-device basis, with a common default policy.

What do you mean with fully dynamic?

> My idea is to have a default policy (create/not create subsystem devices
> if NMIC is set) set via kernel command-line, and udev rules for devices
> requiring separate handling.

Yikes.  That's exactly where I do _not_ want to go.  No more arcane
magic setup that you need to be in the in group for to know like
dm-multipath.  Things must just work, period.

The only other option I could think of would be to turn names around:
make /dev/nvmeX (chardev) and /dev/nvmeXnY the per-subsystem devices
that are multipathed if available.  We'd then need new devices for the
invdividual controllers.  With a little luck we'd get away with just
creating character devices.  This would however create a problem for
dm-multipath users, which mostly is you and your paterners/customers.

Note that in general dm-multipath should continue working but it would
generally just see one path.

  reply	other threads:[~2017-10-04  7:13 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 13:55 [PATCH 0/6] nvme: sanitize multipathing Hannes Reinecke
2017-10-02 13:55 ` [PATCH 1/6] nvme: display 'CMIC' controller attribute Hannes Reinecke
2017-10-02 16:15   ` Christoph Hellwig
2017-10-02 13:55 ` [PATCH 2/6] nvme: use 'nvmsXnZ' instead of 'nvm-subXnZ' Hannes Reinecke
2017-10-02 16:16   ` Christoph Hellwig
2017-10-02 16:20     ` Keith Busch
2017-10-11 14:32       ` Guan Junxiong
2017-10-02 13:55 ` [PATCH 3/6] nvme: claim block devices Hannes Reinecke
2017-10-02 16:42   ` Christoph Hellwig
2017-10-03 10:08     ` Hannes Reinecke
2017-10-03 11:55       ` Christoph Hellwig
2017-10-04  5:42         ` Hannes Reinecke
2017-10-04  6:15           ` Christoph Hellwig
2017-10-04  6:33             ` Hannes Reinecke
2017-10-04  7:13               ` Christoph Hellwig [this message]
2017-10-04  7:26                 ` Hannes Reinecke
2017-10-05  1:08                 ` Martin K. Petersen
2017-10-05  6:51                   ` Johannes Thumshirn
2017-10-05 14:05                     ` Keith Busch
2017-10-05 14:39                       ` Hannes Reinecke
2017-10-05 14:47                         ` Christoph Hellwig
2017-10-02 13:55 ` [PATCH 4/6] nvme: display 'NMIC' namespace attribute Hannes Reinecke
2017-10-02 16:16   ` Christoph Hellwig
2017-10-03 10:00     ` Hannes Reinecke
2017-10-03 11:49       ` Christoph Hellwig
2017-10-03 16:01         ` Hannes Reinecke
2017-10-02 13:55 ` [PATCH 5/6] nvme: Export subsystems to /sys/class/nvme-subsys Hannes Reinecke
2017-10-02 16:18   ` Christoph Hellwig
2017-10-02 16:53     ` Keith Busch
2017-10-02 16:56       ` Christoph Hellwig
2017-10-02 17:15         ` Keith Busch
2017-10-02 13:55 ` [PATCH 6/6] nvme: ignore retries for multipath devices Hannes Reinecke
2017-10-02 16:22   ` Christoph Hellwig
2017-10-03 10:02     ` Hannes Reinecke
2017-10-03 11:53       ` Christoph Hellwig
2017-10-02 14:35 ` [PATCH] nvme: reset retires after path failover Johannes Thumshirn
2017-10-02 14:43   ` Keith Busch
2017-10-02 15:08     ` Hannes Reinecke
2017-10-02 14:45   ` Johannes Thumshirn
2017-10-02 16:25     ` Christoph Hellwig
2017-10-02 14:46   ` Johannes Thumshirn
2017-10-02 16:19   ` Christoph Hellwig

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=20171004071312.GA21143@lst.de \
    --to=hch@lst.de \
    /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).