blkcg: always associate a bio with a blkg
Previously, blkg's were only assigned as needed by blk-iolatency and blk-throttle. bio->css was also always being associated while blkg was being looked up and then thrown away in blkcg_bio_issue_check. This patch begins the cleanup of bio->css and bio->bi_blkg by always associating a blkg in blkcg_bio_issue_check. This tries to create the blkg, but if it is not possible, falls back to using the root_blkg of the request_queue. Therefore, a bio will always be associated with a blkg. The duplicate association logic is removed from blk-throttle and blk-iolatency. Signed-off-by:Dennis Zhou <dennisszhou@gmail.com> Acked-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- block/bio.c 38 additions, 0 deletionsblock/bio.c
- block/blk-iolatency.c 2 additions, 22 deletionsblock/blk-iolatency.c
- block/blk-throttle.c 1 addition, 4 deletionsblock/blk-throttle.c
- include/linux/bio.h 3 additions, 0 deletionsinclude/linux/bio.h
- include/linux/blk-cgroup.h 2 additions, 14 deletionsinclude/linux/blk-cgroup.h
Loading
Please register or sign in to comment