xfs: avoid getting stuck during async inode flushes
commitee58abdfcc8201f500107c7ba03f738af8b49b85
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Apr 2011 09:34:26 +0000 (21 09:34 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 19 May 2011 17:03:42 +0000 (19 12:03 -0500)
tree626cb302906b221d676c8318a7082663c3e80fdb
parente57375153d7376f2a923d98c388c1e20227b5731
xfs: avoid getting stuck during async inode flushes

When the underlying inode buffer is locked and xfs_sync_inode_attr()
is doing a non-blocking flush, xfs_iflush() can return EAGAIN.  When
this happens, clear the error rather than returning it to
xfs_inode_ag_walk(), as returning EAGAIN will result in the AG walk
delaying for a short while and trying again. This can result in
background walks getting stuck on the one AG until inode buffer is
unlocked by some other means.

This behaviour was noticed when analysing event traces followed by
code inspection and verification of the fix via further traces.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_sync.c