diff mbox series

[V2,1/3] block: set ioprio for zone-reset bio

Message ID 20190821061156.3127-2-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series block: set ioprio value | expand

Commit Message

Chaitanya Kulkarni Aug. 21, 2019, 6:11 a.m. UTC
Set the current process's iopriority to the bio for REQ_OP_ZONE_RESET
and REQ_OP_ZONE_RESET_ALL.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/blk-zoned.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 4bc5f260248a..741759b5e302 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -214,6 +214,7 @@  static int __blkdev_reset_all_zones(struct block_device *bdev, gfp_t gfp_mask)
 	/* across the zones operations, don't need any sectors */
 	bio_set_dev(bio, bdev);
 	bio_set_op_attrs(bio, REQ_OP_ZONE_RESET_ALL, 0);
+	bio_set_prio(bio, get_current_ioprio());
 
 	ret = submit_bio_wait(bio);
 	bio_put(bio);
@@ -290,6 +291,7 @@  int blkdev_reset_zones(struct block_device *bdev,
 		bio->bi_iter.bi_sector = sector;
 		bio_set_dev(bio, bdev);
 		bio_set_op_attrs(bio, REQ_OP_ZONE_RESET, 0);
+		bio_set_prio(bio, get_current_ioprio());
 
 		sector += zone_sectors;