[PATCH 6/6] nvme: track shared namespaces in a siblings list
Christoph Hellwig
hch at lst.de
Mon Jun 19 06:00:45 PDT 2017
On Mon, Jun 19, 2017 at 02:27:26PM +0300, Sagi Grimberg wrote:
> I completely agree that the multipath map (sibling list) is
> driver specific, I'm just arguing that the search itself can
> be invoked from the block layer through a block_device_operation
> when the bdev is created (in there, the driver sibling search has
> its own driver specific locking).
Let's wait for that until we have some block layer code posted.
I'll see if I can make this work, but I suspect driving the search
from the driver is going to be a lot easier.
> btw, I didn't see handling of the case where a sibling match found where
> the sibling is already linked (a sibling too).
>
> say we have namespaces a, b and c, where b,c are siblings of a (all with
> the same nsid=3).
>
> If I read the code correctly, c will link to both a and b wouldn't it?
>
> Do we need to check: list_empty(&cur->siblings)?
>
> Or am I not understanding the data structure?
Yeah, we should break after finding the first sibling. Let me create
a test setup with three controllers with the same namespaces..
More information about the Linux-nvme
mailing list