summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_alloc.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2023-06-28 11:04:33 -0700
committerDarrick J. Wong <djwong@kernel.org>2023-06-29 09:28:24 -0700
commit0853b5de42b471a92f4ff128a8757b87427d2431 (patch)
tree7bd7360491b2425bfe2fdc2062157e94743b6a37 /fs/xfs/libxfs/xfs_alloc.c
parent6a2a9d776c4ae24a797e25eed2b9f7f33f756296 (diff)
downloadlinux-0853b5de42b471a92f4ff128a8757b87427d2431.tar.gz
linux-0853b5de42b471a92f4ff128a8757b87427d2431.tar.bz2
linux-0853b5de42b471a92f4ff128a8757b87427d2431.zip
xfs: allow extent free intents to be retried
Extent freeing neeeds to be able to avoid a busy extent deadlock when the transaction itself holds the only busy extents in the allocation group. This may occur if we have an EFI that contains multiple extents to be freed, and the freeing the second intent requires the space the first extent free released to expand the AGFL. If we block on the busy extent at this point, we deadlock. We hold a dirty transaction that contains a entire atomic extent free operations within it, so if we can abort the extent free operation and commit the progress that we've made, the busy extent can be resolved by a log force. Hence we can restart the aborted extent free with a new transaction and continue to make progress without risking deadlocks. To enable this, we need the EFI processing code to be able to handle an -EAGAIN error to tell it to commit the current transaction and retry again. This mechanism is already built into the defer ops processing (used bythe refcount btree modification intents), so there's relatively little handling we need to add to the EFI code to enable this. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
0 files changed, 0 insertions, 0 deletions