[PATCH 07/10] nvme: track shared namespaces
Guan Junxiong
guanjunxiong at huawei.com
Mon Aug 28 05:41:23 PDT 2017
On 2017/8/24 1:58, Christoph Hellwig wrote:
> +static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid,
> + struct nvme_id_ns *id)
> +{
> + struct nvme_ctrl *ctrl = ns->ctrl;
> + bool is_shared = id->nmic & (1 << 0);
> + struct nvme_ns_head *head = NULL;
> + int ret = 0;
> +
> + mutex_lock(&ctrl->subsys->lock);
> + if (is_shared)
> + head = __nvme_find_ns_head(ctrl->subsys, nsid);
If a namespace can be accessed by another subsystem, the above line
will ignore such namespace.
Or does the NVMe/NVMf specification constrain that any namespace
can only be accessed by a subsystem?
More comments after testing will be sent later.
Thanks
Guan Junxiong
More information about the Linux-nvme
mailing list