On Wed, Jun 10, 2020 at 05:54:56PM +0200, Jan Kara wrote: > On Wed 10-06-20 08:06:14, Christoph Hellwig wrote: > > On Mon, Jun 01, 2020 at 11:18:56AM +0200, Jan Kara wrote: > > > When we are processing writeback for sync(2), move_expired_inodes() > > > didn't set any inode expiry value (older_than_this). This can result in > > > writeback never completing if there's steady stream of inodes added to > > > b_dirty_time list as writeback rechecks dirty lists after each writeback > > > round whether there's more work to be done. Fix the problem by using > > > sync(2) start time is inode expiry value when processing b_dirty_time > > > list similarly as for ordinarily dirtied inodes. This requires some > > > refactoring of older_than_this handling which simplifies the code > > > noticeably as a bonus. > > > > Looks sane, but if you touch all the older_than_this users can we > > rename it to something more reasonable like oldest or oldest_jif? > > OK, I can certainly rename this. I've just realized that 'oldest' is really > misleading since we are in fact processing inodes that were dirtied before > the given time. So maybe name that 'dirtied_before'? Sounds good to me.