blkcg: implement bio_associate_blkcg()
authorTejun Heo <tj@kernel.org>
Fri, 22 May 2015 21:13:24 +0000 (17:13 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 2 Jun 2015 14:33:34 +0000 (08:33 -0600)
commit1d933cf096e3aea15f1aec8297657b7a846fab63
tree43ac4eff222da7ef5c873259462d906f9e3f9a7b
parentfd383c2d3cae146337cea809de0d622b8b887e6c
blkcg: implement bio_associate_blkcg()

Currently, a bio can only be associated with the io_context and blkcg
of %current using bio_associate_current().  This is too restrictive
for cgroup writeback support.  Implement bio_associate_blkcg() which
associates a bio with the specified blkcg.

bio_associate_blkcg() leaves the io_context unassociated.
bio_associate_current() is updated so that it considers a bio as
already associated if it has a blkcg_css, instead of an io_context,
associated with it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio.c
include/linux/bio.h