blkcg: associate blkg when associating a device
Previously, blkg association was handled by controller specific code in blk-throttle and blk-iolatency. However, because a blkg represents a relationship between a blkcg and a request_queue, it makes sense to keep the blkg->q and bio->bi_disk->queue consistent. This patch moves association into the bio_set_dev macro(). This should cover the majority of cases where the device is set/changed keeping the two pointers consistent. Fallback code is added to blkcg_bio_issue_check() to catch any missing paths. Signed-off-by:Dennis Zhou <dennis@kernel.org> Reviewed-by:
Josef Bacik <josef@toxicpanda.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- block/bio.c 1 addition, 0 deletionsblock/bio.c
- block/blk-iolatency.c 1 addition, 3 deletionsblock/blk-iolatency.c
- block/blk-throttle.c 0 additions, 1 deletionblock/blk-throttle.c
- include/linux/bio.h 2 additions, 0 deletionsinclude/linux/bio.h
- include/linux/blk-cgroup.h 10 additions, 8 deletionsinclude/linux/blk-cgroup.h
Loading
Please register or sign in to comment