From: Chaitanya Kulkarni Date: Tue, 7 Jan 2020 21:58:17 +0000 (-0800) Subject: block: mark zone-mgmt bios with REQ_SYNC X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8e42d239cb027143915cae13eb2ecf1360ee24de;p=linux.git block: mark zone-mgmt bios with REQ_SYNC In the current implementation, final zone-mgmt request is issued with submit_bio_wait() which marks the bio REQ_SYNC. This is needed since immediate action is expected for zone-mgmt requests as these are blocking operations. This also bypasses the scheduler in the blk_mq_make_request() and dispatches the request directly into the hw ctx. This patch marks all the chained bios REQ_SYNC so that we can have above-mentioned behavior for non-final bios also. Reviewed-by: Damien Le Moal Reviewed-by: Bob Liu Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe --- diff --git a/block/blk-zoned.c b/block/blk-zoned.c index d00fcfd71dfea..05741c6f618be 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -198,7 +198,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op, break; } - bio->bi_opf = op; + bio->bi_opf = op | REQ_SYNC; bio->bi_iter.bi_sector = sector; sector += zone_sectors;