On 10/23/2017 04:51 PM, Christoph Hellwig wrote: > Introduce a new struct nvme_ns_head that holds information about an actual > namespace, unlike struct nvme_ns, which only holds the per-controller > namespace information. For private namespaces there is a 1:1 relation of > the two, but for shared namespaces this lets us discover all the paths to > it. For now only the identifiers are moved to the new structure, but most > of the information in struct nvme_ns should eventually move over. > > To allow lockless path lookup the list of nvme_ns structures per > nvme_ns_head is protected by SRCU, which requires freeing the nvme_ns > structure through call_srcu. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > Reviewed-by: Keith Busch <keith.busch@xxxxxxxxx> > Reviewed-by: Javier González <javier@xxxxxxxxxxxx> > Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx> > --- > drivers/nvme/host/core.c | 190 +++++++++++++++++++++++++++++++++++++------ > drivers/nvme/host/lightnvm.c | 14 ++-- > drivers/nvme/host/nvme.h | 21 ++++- > 3 files changed, 190 insertions(+), 35 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +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)