Re: [PATCH] scsi: core: Set BLK_FEAT_SKIP_TAGSET_QUIESCE on pseudo SCSI devices
From: Stanley Jhu
Date: Fri Sep 11 2026 - 09:19:46 EST
On Tue, 1 Sep 2026, Bart Van Assche wrote:
> Has it been considered to remove the blk_mq_unquiesce_tagset()
> call from ufshcd_err_handling_unprepare() and to change the
> blk_mq_quiesce_tagset() call in ufshcd_err_handling_prepare() into
> blk_mq_wait_quiesce_done()?
I tested that on next-20260824. It clears the NOP OUT deadlock.
However, switching to wait-only means no request queue is ever marked
with QUEUE_FLAG_QUIESCED during error recovery.
blk_mq_wait_quiesce_done() is only a drain, not a barrier; its
kernel-doc explicitly notes that it expects the driver to have set the
quiesce flag beforehand on the target queues. Without QUEUE_FLAG_QUIESCED,
the block layer dispatch path remains wide open. In testing with
background direct I/O under a non-fatal error, wait-only allowed 27
commands to dispatch to the controller during prepare, whereas
quiescing kept dispatches at 0.
Prior to commit 2a36646012fc ("scsi: ufs: core: Simplify
ufshcd_err_handling_prepare()"), the prepare path explicitly blocked
new dispatches via ufshcd_scsi_block_requests() alongside
blk_mq_wait_quiesce_done(). Dropping quiesce entirely therefore leaves
regular LUNs completely unguarded during recovery.
Quiescing logical units individually via shost_for_each_device()
resolves this: it preserves the block-layer quiesce contract and
pre-existing protection on storage queues, while cleanly leaving
pseudo_sdev unquiesced for NOP OUT.
On the SCSI core patch, your point holds: ufshcd_pause_command_processing()
and clock scaling also need pseudo_sdev quiesced, so a queue-level flag
is the wrong abstraction. Please consider that patch withdrawn.
I posted that patch at:
https://lore.kernel.org/linux-scsi/20260902082306.2299159-1-stanleyjhu@xxxxxxxxxx/
If this direction looks good to you, I will respin v2 with the Link: tag
fixed and the commit message updated with the above rationale.
Thanks,
Stanley