mpage: make __mpage_writepage() honor cgroup writeback
authorTejun Heo <tj@kernel.org>
Fri, 22 May 2015 21:14:04 +0000 (17:14 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 2 Jun 2015 14:38:04 +0000 (08:38 -0600)
commit429b3fb027492b2b9f96e00bb1a9255fc56d4934
tree8ca9081601d7d3a09e428760e004078a7f27a28b
parentbafc0dba1e20d84578d7098d32caf63441e5743d
mpage: make __mpage_writepage() honor cgroup writeback

__mpage_writepage() is used to implement mpage_writepages() which in
turn is used for ->writepages() of various filesystems.  All writeback
logic is now updated to handle cgroup writeback and the block cgroup
to issue IOs for is encoded in writeback_control and can be retrieved
from the inode; however, __mpage_writepage() currently ignores the
blkcg indicated by the inode and issues all bio's without explicit
blkcg association.

This patch updates __mpage_writepage() so that the issued bio's are
associated with inode_to_writeback_blkcg_css(inode).

v2: Updated for per-inode wb association.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/mpage.c