Skip to content

Commit

Permalink
xfs: return locked status of inode buffer on xfsaild push
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brian Foster authored and Darrick J. Wong committed Mar 28, 2020
1 parent 8d3d7e2 commit d4bc4c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/xfs_inode_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d4bc4c5

Please sign in to comment.