Commit 91ebecc7 authored by David Chinner's avatar David Chinner Committed by Tim Shimmin

[XFS] Allow punching holes to free space when at ENOSPC

Make the free file space transaction able to dip into the reserved blocks
to ensure that we can successfully free blocks when the filesystem is at
ENOSPC.

SGI-PV: 967788
SGI-Modid: xfs-linux-melb:xfs-kern:29167a
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarVlad Apostolov <vapo@sgi.com>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent 4f57dbc6
...@@ -4434,9 +4434,12 @@ xfs_free_file_space( ...@@ -4434,9 +4434,12 @@ xfs_free_file_space(
while (!error && !done) { while (!error && !done) {
/* /*
* allocate and setup the transaction * allocate and setup the transaction. Allow this
* transaction to dip into the reserve blocks to ensure
* the freeing of the space succeeds at ENOSPC.
*/ */
tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT);
tp->t_flags |= XFS_TRANS_RESERVE;
error = xfs_trans_reserve(tp, error = xfs_trans_reserve(tp,
resblks, resblks,
XFS_WRITE_LOG_RES(mp), XFS_WRITE_LOG_RES(mp),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment