diff mbox series

[RFC,12/18] block: set ioprio for flush bio

Message ID 20190501042831.5313-13-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series blktrace: add blktrace extension support | expand

Commit Message

Chaitanya Kulkarni May 1, 2019, 4:28 a.m. UTC
This change is required to track the priority for the flush operations
with blktrace extension.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/blk-flush.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/block/blk-flush.c b/block/blk-flush.c
index d95f94892015..af84ed4cafc9 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -70,6 +70,7 @@ 
 #include <linux/blkdev.h>
 #include <linux/gfp.h>
 #include <linux/blk-mq.h>
+#include <linux/ioprio.h>
 
 #include "blk.h"
 #include "blk-mq.h"
@@ -446,6 +447,7 @@  int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
 	bio = bio_alloc(gfp_mask, 0);
 	bio_set_dev(bio, bdev);
 	bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
+	bio_set_prio(bio, get_current_ioprio());
 
 	ret = submit_bio_wait(bio);