Re: [PATCH 2/2] block: set QUEUE_FLAG_NO_ELV_SWITCH under the read lock in del_gendisk()
From: Qiliang Yuan
Date: Tue Nov 03 2026 - 01:21:01 EST
On Tue, 3 Nov 2026 11:23:59 +0530, Nilay Shroff wrote:
> Currently, there's a patch[1] in-review to change update_nr_hwq_lock from
> write to read while switching elevator.
>
> So the proposal in this patch may not work out if the changes in patch[1]
> are accepted. I understand your proposed patchset but I'd recommend wait a
> bit till we settle with the patch[1].
>
> [1] https://lore.kernel.org/all/20261031044141.5569-1-laveeshb@xxxxxxxxxxxxxxxxx/
Right, with [1] a switch holds the lock for read and uses
QUEUE_FLAG_NO_ELV_SWITCH as its busy bit, so setting the flag under the
read lock here could be undone by a switch that is still running.
I'll drop this patch, send patch 1 on its own, and come back to this
once [1] has settled.
Thanks,
Qiliang