On 5/23/25 10:20, Christoph Hellwig wrote:
Something like this completely untested patch:
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 8f15d1aa6eb8..6841af8a989c 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1306,16 +1306,18 @@ static void blk_zone_wplug_bio_work(struct work_struct *work) spin_unlock_irqrestore(&zwplug->lock, flags); bdev = bio->bi_bdev;
- submit_bio_noacct_nocheck(bio);
- /*
*/
- blk-mq devices will reuse the extra reference on the request queue
- usage counter we took when the BIO was plugged, but the submission
- path for BIO-based devices will not do that. So drop this extra
- reference here.
- if (bdev_test_flag(bdev, BD_HAS_SUBMIT_BIO))
- if (bdev_test_flag(bdev, BD_HAS_SUBMIT_BIO)) {
blk_queue_exit(bdev->bd_disk->queue);bdev->bd_disk->fops->submit_bio(bio);
- } else {
blk_mq_submit_bio(bio);
- }
put_zwplug: /* Drop the reference we took in disk_zone_wplug_schedule_bio_work(). */
I ran xfs on an SMR drive with this and I had no issues. Will do more test with a device mapper added.