On Fri, Sep 04 2009, Jens Axboe wrote: > +static long wb_check_old_data_flush(struct bdi_writeback *wb) > +{ > + unsigned long expired; > + long nr_pages; > + > + expired = wb->last_old_flush + > + msecs_to_jiffies(dirty_writeback_interval * 10); > + if (time_before(jiffies, expired)) > + return 0; > + > + nr_pages = global_page_state(NR_FILE_DIRTY) + > + global_page_state(NR_UNSTABLE_NFS) + > + (inodes_stat.nr_inodes - inodes_stat.nr_unused); > + > + return wb_writeback(wb, nr_pages, NULL, WB_SYNC_NONE, 1); > +} Needs to set ->last_old_flush of course. I also made it check for nr_pages > 0 before calling into wb_writeback(). -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html