From: Tejun Heo Date: Fri, 22 May 2015 21:14:01 +0000 (-0400) Subject: writeback: make writeback initiation functions handle multiple bdi_writeback's X-Git-Tag: omap-for-v4.2/fixes-rc1^2~117^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db125360409fc320790e0d38218bd7a3e9cd2552;p=pandora-kernel.git writeback: make writeback initiation functions handle multiple bdi_writeback's [try_]writeback_inodes_sb[_nr]() and sync_inodes_sb() currently only handle dirty inodes on the root wb (bdi_writeback) of the target bdi. This patch implements bdi_split_work_to_wbs() and use it to make these functions handle multiple wb's. bdi_split_work_to_wbs() takes a base wb_writeback_work and create clones of it and issue them to the wb's of the target bdi. The base work's nr_pages is distributed using wb_split_bdi_pages() - ie. according to each wb's write bandwidth's proportion in the bdi. Cloning a bdi involves memory allocation which may fail. In such cases, bdi_split_work_to_wbs() issues the base work directly and waits for its completion before proceeding to the next wb to guarantee forward progress and correctness under memory pressure. Signed-off-by: Tejun Heo Cc: Jens Axboe Cc: Jan Kara Signed-off-by: Jens Axboe --- Reading git-diff-tree failed