lkml.org 
[lkml]   [2019]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 1/3] block: set ioprio for zone-reset bio
Date
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 --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;

--
2.17.0
\
 
 \ /
  Last update: 2019-08-21 08:20    [W:0.034 / U:32.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site