summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2020-03-27 18:29:55 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-28 19:40:12 +0300
commitd4bc4c5fd177066b38e3a39ac751399e8dff80cf (patch)
tree268e7ca4a4531b5039856df51b7d97fef325e2ba /fs/xfs
parent8d3d7e2b35ea7d91d6e085c93b5efecfb0fba307 (diff)
downloadlinux-d4bc4c5fd177066b38e3a39ac751399e8dff80cf.tar.xz
xfs: return locked status of inode buffer on xfsaild push
If the inode buffer backing a particular inode is locked, xfs_iflush() returns -EAGAIN and xfs_inode_item_push() skips the inode. It still returns success to xfsaild, however, which bypasses the xfsaild backoff heuristic. Update xfs_inode_item_push() to return locked status if the inode buffer couldn't be locked. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_inode_item.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index a627cb951dc6..f779cca2346f 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -552,7 +552,8 @@ xfs_inode_item_push(
if (!xfs_buf_delwri_queue(bp, buffer_list))
rval = XFS_ITEM_FLUSHING;
xfs_buf_relse(bp);
- }
+ } else if (error == -EAGAIN)
+ rval = XFS_ITEM_LOCKED;
spin_lock(&lip->li_ailp->ail_lock);
out_unlock: