summaryrefslogtreecommitdiffstats
path: root/block/blk-ioprio.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2022-06-23 09:48:32 +0200
committerJens Axboe <axboe@kernel.dk>2022-06-27 14:29:12 +0200
commit82b74cac28493fb40ea74fb2fe648b5fc7ea0c1c (patch)
tree4965afde9f626a0c326ad99297436b258fd93d5c /block/blk-ioprio.h
parentblk-ioprio: Remove unneeded field (diff)
downloadlinux-82b74cac28493fb40ea74fb2fe648b5fc7ea0c1c.tar.xz
linux-82b74cac28493fb40ea74fb2fe648b5fc7ea0c1c.zip
blk-ioprio: Convert from rqos policy to direct call
Convert blk-ioprio handling from a rqos policy to a direct call from blk_mq_submit_bio(). Firstly, blk-ioprio is not much of a rqos policy anyway, it just needs a hook in bio submission path to set the bio's IO priority. Secondly, the rqos .track hook gets actually called too late for blk-ioprio purposes and introducing a special rqos hook just for blk-ioprio looks even weirder. Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220623074840.5960-7-jack@suse.cz Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-ioprio.h')
-rw-r--r--block/blk-ioprio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/block/blk-ioprio.h b/block/blk-ioprio.h
index a7785c2f1aea..5a1eb550e178 100644
--- a/block/blk-ioprio.h
+++ b/block/blk-ioprio.h
@@ -6,14 +6,23 @@
#include <linux/kconfig.h>
struct request_queue;
+struct bio;
#ifdef CONFIG_BLK_CGROUP_IOPRIO
int blk_ioprio_init(struct request_queue *q);
+void blk_ioprio_exit(struct request_queue *q);
+void blkcg_set_ioprio(struct bio *bio);
#else
static inline int blk_ioprio_init(struct request_queue *q)
{
return 0;
}
+static inline void blk_ioprio_exit(struct request_queue *q)
+{
+}
+static inline void blkcg_set_ioprio(struct bio *bio)
+{
+}
#endif
#endif /* _BLK_IOPRIO_H_ */