On 4/2/23 14:49, Tomas Henzl wrote:
On 3/31/23 20:48, Bart Van Assche wrote:
I'm interested in failing future I/O from inside sd_shutdown() because
it would allow me to remove the I/O quiescing code from the UFS driver
shutdown callback.
I'm aware of this, other drivers do have similar code and so it would
help elsewhere as well. The patch as it is doesn't however ensure that
there isn't for example an I/O started before sd.shutdown which may
arrive in a driver after his shutdown has been called. Because of that I
haven't used this as an argument in the discussion here.
Has it been considered to call blk_mq_freeze_queue() and
blk_mq_unfreeze_queue() to wait for I/O that started earlier?
Has it been considered to set QUEUE_FLAG_DYING to make future SCSI
commands fail? See also blk_mq_destroy_queue().
Thanks,
Bart.