block: only build the icq tracking code when needed

Only bfq needs to code to track icq, so make it conditional.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211209063131.18537-12-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig
2021-12-09 07:31:31 +01:00
committed by Jens Axboe
parent 90b627f542
commit 5ef1630586
5 changed files with 55 additions and 29 deletions

View File

@@ -100,16 +100,18 @@ struct io_context {
atomic_long_t refcount;
atomic_t active_ref;
unsigned short ioprio;
#ifdef CONFIG_BLK_ICQ
/* all the fields below are protected by this lock */
spinlock_t lock;
unsigned short ioprio;
struct radix_tree_root icq_tree;
struct io_cq __rcu *icq_hint;
struct hlist_head icq_list;
struct work_struct release_work;
#endif /* CONFIG_BLK_ICQ */
};
struct task_struct;