OSDN Git Service

block: introduce bio_issue_as_root_blkg
authorJosef Bacik <jbacik@fb.com>
Tue, 3 Jul 2018 15:14:51 +0000 (11:14 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:53 +0000 (09:07 -0600)
commitc7c98fd37653955d3a17dd4f1fa67aba070096a9
treeab365652b13fbcd75c32267e377f41a42eef97d2
parent08e18eab0c579ad84399c1899c11899734854eb2
block: introduce bio_issue_as_root_blkg

Instead of forcing all file systems to get the right context on their
bio's, simply check for REQ_META to see if we need to issue as the root
blkg.  We don't want to force all bio's to have the root blkg associated
with them if REQ_META is set, as some controllers (blk-iolatency) need
to know who the originating cgroup is so it can backcharge them for the
work they are doing.  This helper will make sure that the controllers do
the proper thing wrt the IO priority and backcharging.

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