This change is required so that we can track the priority for the
REQ_OP_ZONE_RESET using "blkzone reset <device_name>" command.

Signed-off-by: Chaitanya Kulkarni <[email protected]>
---
 block/blk-zoned.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 2d98803faec2..5d8517654b16 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -13,6 +13,7 @@
 #include <linux/rbtree.h>
 #include <linux/blkdev.h>
 #include <linux/blk-mq.h>
+#include <linux/ioprio.h>
 
 #include "blk.h"
 
@@ -248,6 +249,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;
 
-- 
2.19.1

Reply via email to