Skip to content

Commit

Permalink
writeback: make wakeup_dirtytime_writeback() handle multiple bdi_writ…
Browse files Browse the repository at this point in the history
…eback's

wakeup_dirtytime_writeback() currently only starts writeback on the
root wb (bdi_writeback).  For cgroup writeback support, update the
function to check all wbs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
htejun authored and axboe committed Jun 2, 2015
1 parent f2b6512 commit 001fe6f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,12 @@ static void wakeup_dirtytime_writeback(struct work_struct *w)

rcu_read_lock();
list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
if (list_empty(&bdi->wb.b_dirty_time))
continue;
wb_wakeup(&bdi->wb);
struct bdi_writeback *wb;
struct wb_iter iter;

bdi_for_each_wb(wb, bdi, &iter, 0)
if (!list_empty(&bdi->wb.b_dirty_time))
wb_wakeup(&bdi->wb);
}
rcu_read_unlock();
schedule_delayed_work(&dirtytime_work, dirtytime_expire_interval * HZ);
Expand Down

0 comments on commit 001fe6f

Please sign in to comment.