[PATCH 3/6] nvme: claim block devices
Hannes Reinecke
hare at suse.de
Tue Oct 3 23:33:07 PDT 2017
On 10/04/2017 08:15 AM, Christoph Hellwig wrote:
> On Wed, Oct 04, 2017 at 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.
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.
Will be drafting up a set of patches to demonstrate the idea.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare at suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
More information about the Linux-nvme
mailing list