|
|
@@ -99,6 +99,8 @@ static bool wb_io_lists_populated(struct bdi_writeback *wb)
|
|
|
return false;
|
|
|
} else {
|
|
|
set_bit(WB_has_dirty_io, &wb->state);
|
|
|
+ atomic_long_add(wb->avg_write_bandwidth,
|
|
|
+ &wb->bdi->tot_write_bandwidth);
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
@@ -106,8 +108,11 @@ static bool wb_io_lists_populated(struct bdi_writeback *wb)
|
|
|
static void wb_io_lists_depopulated(struct bdi_writeback *wb)
|
|
|
{
|
|
|
if (wb_has_dirty_io(wb) && list_empty(&wb->b_dirty) &&
|
|
|
- list_empty(&wb->b_io) && list_empty(&wb->b_more_io))
|
|
|
+ list_empty(&wb->b_io) && list_empty(&wb->b_more_io)) {
|
|
|
clear_bit(WB_has_dirty_io, &wb->state);
|
|
|
+ atomic_long_sub(wb->avg_write_bandwidth,
|
|
|
+ &wb->bdi->tot_write_bandwidth);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|