On Thu 05-08-10 17:21:07, Andrew Morton wrote: > On Thu, 5 Aug 2010 20:53:19 +0200 > Jan Kara <jack@xxxxxxx> wrote: > > > WB_SYNC_NONE writeback is done in rounds of 1024 pages so that we don't write > > out some huge inode for too long while starving writeout of other inodes. To > > avoid livelocks, we record time we started writeback in wbc->wb_start and do > > not write out inodes which were dirtied after this time. But currently, > > writeback_inodes_wb() resets wb_start each time it is called thus effectively > > invalidating this logic and making any WB_SYNC_NONE writeback prone to > > livelocks. > > data point: that was eight-year-old code that we broke. Five months ago. > > How did you discover this? You have test cases which cover this > scenario and things locked up? There was a bug report where someone complained sync(1) takes much longer than it used to. So I had look at the code and noticed this bug (and also the problem that we get stuck doing background writeback while the sync work is waiting). Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- 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