82b74cac28
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>
29 lines
552 B
C
29 lines
552 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BLK_IOPRIO_H_
|
|
#define _BLK_IOPRIO_H_
|
|
|
|
#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_ */
|