Skip to content
  • Darrick J. Wong's avatar
    xfs: move inode flush to the sync workqueue · f0f7a674
    Darrick J. Wong authored
    Move the inode dirty data flushing to a workqueue so that multiple
    threads can take advantage of a single thread's flushing work.  The
    ratelimiting technique used in bdd4ee4 was not successful, because
    threads that skipped the inode flush scan due to ratelimiting would
    ENOSPC early, which caused occasional (but noticeable) changes in
    behavior and sporadic fstest regressions.
    
    Therefore, make all the writer threads wait on a single inode flush,
    which eliminates both the stampeding hordes of flushers and the small
    window in which a write could fail with ENOSPC because it lost the
    ratelimit race after even another thread freed space.
    
    Fixes: c6425702
    
     ("xfs: ratelimit inode flush on buffered write ENOSPC")
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    f0f7a674