diff mbox series

[V3] block: mark zone-mgmt bios with REQ_SYNC

Message ID 20200107215817.2162-1-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series [V3] block: mark zone-mgmt bios with REQ_SYNC | expand

Commit Message

Chaitanya Kulkarni Jan. 7, 2020, 9:58 p.m. UTC
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 <damien.lemoal@wdc.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
* Changes from V1 :-
1. Update commit description (Jens).
---
 block/blk-zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe Jan. 9, 2020, 4:42 a.m. UTC | #1
On 1/7/20 2:58 PM, Chaitanya Kulkarni wrote:
> 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.

Applied, thanks.
diff mbox series

Patch

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index d00fcfd71dfe..05741c6f618b 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;