[PATCH] NVMe: Automatic namespace rescan

Keith Busch keith.busch at intel.com
Fri May 15 14:59:48 PDT 2015

On Fri, 15 May 2015, Keith Busch wrote:
> On Fri, 15 May 2015, Matthew Wilcox wrote:
>> Pondering if it's worth keeping the list sorted so we can break out early
>> if the namespace isn't in the list?
> The list is actually already sorted since this doesn't allow gaps in
> NSIDs. If a namespace is not attached, the driver creates a 0 capacity
> block device for it and appends it to the list, so it's always in
> ascending order.
> Is this a bad idea? Let's say a controller supports 128 namespaces,
> but only NSID 128 is attached, we'd see 127 zero capacity /dev/nvme#n#
> block devs.

Decided we don't want a bunch of zero capacity drives if there are gaps
in attached NSIDs. There could be millions after all. But it's not so
simple since the nvmeq's hctx points to hctx from a single namespace's
request_queue, and that's not right. I'll take a stab at decoupling that
next week. In the mean time, this patch is dead.

More information about the Linux-nvme mailing list