All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH/RFC] NVMe: add support for doing offline/online of attached namespaces
Date: Tue, 27 Jan 2015 20:59:02 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1501272044190.15481@localhost.lm.intel.com> (raw)
In-Reply-To: <20150123152430.GA6107@kernel.dk>

On Fri, 23 Jan 2015, Jens Axboe wrote:
> Add two new ioctls for the char control device:
>
> - NVME_IOCTL_OFFLINE_DISK will offline namespaces/disks and leave only
>  the admin queue and char dev running.
>
> - NVME_IOCTL_ONLINE_DISK will do discovery and add namespaces and disks
>  back into the system.
>
> The intended use case is for safely doing a format or firmware upgrade,
> where device and hardware characteristics could change substantially
> beyond just device size and block size.
>
> This is an RFC patch. The goal is as listed, being able to detach any
> namespaces and bdevs from a device, so we just have the admin part left.
> I'm open to alternative suggestions on how to handle this. Solutions
> that include rmmod/modprobe if the driver wont work if you have more
> than one NVMe device in a system.
>
> I've run this through various stress testing, and it seems to hold up
> fine.

Looks pretty good, I think we need something like this. We trust a user
too much to not to do something bad when changing things like block sizes,
so it'd be good to have a mechanisms to make this safer.

Should these actions be IOCTLs? I think 'sysfs' might be easier to use,
and easier for adding additional actions in the future.

Could we try for something with more control? For example, I might change
the block format on namespace 2, but namespace 1 is my root partition
so I don't want to delete that disk.

I don't think you need to reference count the namespace open's. The
controller reference is also taken, and the last namespace reference
can't be released until the last controller reference is also released,
so it seems redundant.

That's all I got right now. Thanks!

  parent reply	other threads:[~2015-01-27 20:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 15:24 [PATCH/RFC] NVMe: add support for doing offline/online of attached namespaces Jens Axboe
2015-01-23 17:11 ` Christoph Hellwig
2015-01-23 17:24   ` Jens Axboe
2015-01-23 17:31     ` Christoph Hellwig
2015-01-23 17:39       ` Jens Axboe
2015-01-23 17:44         ` Christoph Hellwig
2015-01-23 17:46           ` Jens Axboe
2015-01-23 17:51             ` Christoph Hellwig
2015-01-23 17:52               ` Jens Axboe
2015-01-27 20:59 ` Keith Busch [this message]
2015-01-28 16:13   ` Jens Axboe

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=alpine.LNX.2.00.1501272044190.15481@localhost.lm.intel.com \
    --to=keith.busch@intel.com \
    /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.