writeback: make congestion functions per bdi_writeback
authorTejun Heo <tj@kernel.org>
Fri, 22 May 2015 21:13:41 +0000 (17:13 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 2 Jun 2015 14:33:35 +0000 (08:33 -0600)
commitec8a6f2643923ee5b74d24fa8d134240379f436b
tree4188866bc98fb571c3c872d0ad972c5ccc974ee4
parentdfb8ae567835425d27db8acc6c9fc5db88d38e2b
writeback: make congestion functions per bdi_writeback

Currently, all congestion functions take bdi (backing_dev_info) and
always operate on the root wb (bdi->wb) and the congestion state from
the block layer is propagated only for the root blkcg.  This patch
introduces {set|clear}_wb_congested() and wb_congested() which take a
bdi_writeback_congested and bdi_writeback respectively.  The bdi
counteparts are now wrappers invoking the wb based functions on
@bdi->wb.

While converting clear_bdi_congested() to clear_wb_congested(), the
local variable declaration order between @wqh and @bit is swapped for
cosmetic reason.

This patch just adds the new wb based functions.  The following
patches will apply them.

v2: Updated for bdi_writeback_congested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@fb.com>
include/linux/backing-dev-defs.h
include/linux/backing-dev.h
mm/backing-dev.c