[PATCH] nvmet: move percpu handling into nvmet_ns_{enable,disable}
Keith Busch
kbusch at kernel.org
Fri Jan 24 11:59:39 PST 2025
On Fri, Jan 24, 2025 at 09:25:05AM +0100, hare at kernel.org wrote:
> From: Hannes Reinecke <hare at kernel.org>
>
> The namespace percpu counter protects pending I/O, and we can
> only safely diable the namespace once the counter drop to zero.
> So we need to init the percpu counter in nvmet_ns_enable(), and
> wait for it to drop to zero in nvmet_ns_disable() to avoid having
> I/O pending after the namespace has been disabled.
>
> Fixes: 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath")
We'll have to wait for after the merge window when the block tree merges
up to apply this: the nvme-6.14 branch doesn't contain the offending
commit yet.
More information about the Linux-nvme
mailing list