[PATCH] nvmet-loop: avoid using mutex in IO hotpath

Christoph Hellwig hch at lst.de
Mon Dec 9 00:01:59 PST 2024


On Fri, Nov 29, 2024 at 04:18:33PM +0530, Nilay Shroff wrote:
> -	xa_for_each(&ctrl->subsys->namespaces, idx, ns) {
> +	xa_for_each_marked(&ctrl->subsys->namespaces, idx,
> +			ns, NVMET_NS_ENABLED) {

Given that this is duplicated quite a bit, maybe add a
nvmet_for_each_enabled_ns wrapper for it?  And also a nvmet_for_each_ns
one that iterates all namespaces?

Otherwise this looks good, and I really like the use of the xarray
mark to simplify things!



More information about the Linux-nvme mailing list