Skip to content

Commit

Permalink
blk-iolatency: pass a gendisk to blk_iolatency_init
Browse files Browse the repository at this point in the history
Pass the gendisk to blk_iolatency_init as part of moving the blk-cgroup
infrastructure to be gendisk based.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andreas Herrmann <aherrmann@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220921180501.1539876-9-hch@lst.de
[axboe: missed inline for blk_iolatency_init() and !CONFIG_BLK_CGROUP_IOLATENCY]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Sep 27, 2022
1 parent b0dde3f commit 16fac1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ int blkcg_init_disk(struct gendisk *disk)
if (ret)
goto err_ioprio_exit;

ret = blk_iolatency_init(q);
ret = blk_iolatency_init(disk);
if (ret)
goto err_throtl_exit;

Expand Down
3 changes: 2 additions & 1 deletion block/blk-iolatency.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,9 @@ static void blkiolatency_enable_work_fn(struct work_struct *work)
}
}

int blk_iolatency_init(struct request_queue *q)
int blk_iolatency_init(struct gendisk *disk)
{
struct request_queue *q = disk->queue;
struct blk_iolatency *blkiolat;
struct rq_qos *rqos;
int ret;
Expand Down
4 changes: 2 additions & 2 deletions block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ static inline struct bio *blk_queue_bounce(struct bio *bio,
}

#ifdef CONFIG_BLK_CGROUP_IOLATENCY
extern int blk_iolatency_init(struct request_queue *q);
int blk_iolatency_init(struct gendisk *disk);
#else
static inline int blk_iolatency_init(struct request_queue *q) { return 0; }
static inline int blk_iolatency_init(struct gendisk *disk) { return 0; };
#endif

#ifdef CONFIG_BLK_DEV_ZONED
Expand Down

0 comments on commit 16fac1b

Please sign in to comment.