]> git.baikalelectronics.ru Git - kernel.git/commit
block: make blkcg aware of kthread stored original cgroup info
authorShaohua Li <shli@fb.com>
Thu, 14 Sep 2017 21:02:06 +0000 (14:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Sep 2017 13:41:22 +0000 (07:41 -0600)
commit7a6d305114ffc0ade15ff8c5fa6bc185f70fb182
tree1e3c7ab62c68cd37e81a13f46bceba374c5ea5ae
parentf50edffee5c197527d2ec97a5f96215f965ca222
block: make blkcg aware of kthread stored original cgroup info

bio_blkcg is the only API to get cgroup info for a bio right now. If
bio_blkcg finds current task is a kthread and has original blkcg
associated, it will use the css instead of associating the bio to
current task. This makes it possible that kthread dispatches bios on
behalf of other threads.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blk-cgroup.h