Bart Van Assche | 556910e | 2021-06-17 17:44:44 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | |
| 3 | #ifndef _BLK_IOPRIO_H_ |
| 4 | #define _BLK_IOPRIO_H_ |
| 5 | |
| 6 | #include <linux/kconfig.h> |
| 7 | |
| 8 | struct request_queue; |
Jan Kara | 82b74ca | 2022-06-23 09:48:32 +0200 | [diff] [blame] | 9 | struct bio; |
Bart Van Assche | 556910e | 2021-06-17 17:44:44 -0700 | [diff] [blame] | 10 | |
| 11 | #ifdef CONFIG_BLK_CGROUP_IOPRIO |
Christoph Hellwig | b0dde3f | 2022-09-21 20:04:51 +0200 | [diff] [blame] | 12 | int blk_ioprio_init(struct gendisk *disk); |
| 13 | void blk_ioprio_exit(struct gendisk *disk); |
Jan Kara | 82b74ca | 2022-06-23 09:48:32 +0200 | [diff] [blame] | 14 | void blkcg_set_ioprio(struct bio *bio); |
Bart Van Assche | 556910e | 2021-06-17 17:44:44 -0700 | [diff] [blame] | 15 | #else |
Christoph Hellwig | b0dde3f | 2022-09-21 20:04:51 +0200 | [diff] [blame] | 16 | static inline int blk_ioprio_init(struct gendisk *disk) |
Bart Van Assche | 556910e | 2021-06-17 17:44:44 -0700 | [diff] [blame] | 17 | { |
| 18 | return 0; |
| 19 | } |
Christoph Hellwig | b0dde3f | 2022-09-21 20:04:51 +0200 | [diff] [blame] | 20 | static inline void blk_ioprio_exit(struct gendisk *disk) |
Jan Kara | 82b74ca | 2022-06-23 09:48:32 +0200 | [diff] [blame] | 21 | { |
| 22 | } |
| 23 | static inline void blkcg_set_ioprio(struct bio *bio) |
| 24 | { |
| 25 | } |
Bart Van Assche | 556910e | 2021-06-17 17:44:44 -0700 | [diff] [blame] | 26 | #endif |
| 27 | |
| 28 | #endif /* _BLK_IOPRIO_H_ */ |