On Wed, May 14, 2025 at 01:29:37PM -0700, Bart Van Assche wrote:
+/*
- Do not call bio_queue_enter() if the BIO_ZONE_WRITE_PLUGGING flag has been
- set because this causes blk_mq_freeze_queue() to deadlock if
- blk_zone_wplug_bio_work() submits a bio. Calling bio_queue_enter() for bios
- on the plug list is not necessary since a q_usage_counter reference is held
- while a bio is on the plug list.
- */
How do we end up with BIO_ZONE_WRITE_PLUGGING set here? If that flag was set in a stacking driver we need to clear it before resubmitting the bio I think.
Can you provide a null_blk based reproducer for your testcase to see what happens here?
Either way we can't just simply skip taking q_usage_count.