[PATCH 4/5] nvme: move namespace scanning to core

Sagi Grimberg sagi at grimberg.me
Mon Apr 18 11:46:32 PDT 2016


> @@ -1549,13 +1554,26 @@ void nvme_scan_namespaces(struct nvme_ctrl *ctrl)
>   		if (!nvme_scan_ns_list(ctrl, nn))
>   			goto done;
>   	}
> -	__nvme_scan_namespaces(ctrl, le32_to_cpup(&id->nn));
> +	nvme_scan_ns_sequential(ctrl, nn);
>    done:
>   	list_sort(NULL, &ctrl->namespaces, ns_cmp);
>   	mutex_unlock(&ctrl->namespaces_mutex);
>   	kfree(id);
> +
> +	if (ctrl->ops->finish_scan)
> +		ctrl->ops->finish_scan(ctrl);

finish_scan suggest this is a ns-scan related activity, but
that does not seem to be the case (pci just sets affinity
hints). Why does the affinity hints setting needs to happen
after the ns scan?

Otherwise looks good,

Reviewed-by: Sagi Grimberg <sagi at rimberg.me>



More information about the Linux-nvme mailing list