diff options
author | Brian Behlendorf <[email protected]> | 2022-03-08 09:16:35 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-03-08 11:46:03 -0800 |
commit | 145af480d32a866c5732977688ce5cb132ac2faf (patch) | |
tree | f269c8bfc08e668c2ef0c1deaebba76232d71156 /tests/runfiles | |
parent | b3b6491ce99c91739b8a25d513404188f8769125 (diff) |
Fix ENOSPC when unlinking multiple files from full pool
When unlinking multiple files from a pool at 100% capacity, it was
possible for ENOSPC to be returned after the first unlink. e.g.
rm -f /mnt/fs/test1.0.0 /mnt/fs/test1.1.0 /mnt/fs/test1.2.0
rm: cannot remove '/mnt/fs/test1.1.0': No space left on device
rm: cannot remove '/mnt/fs/test1.2.0': No space left on device
After waiting for the pending deferred frees from the first unlink to
be processed the remaining files can then be unlinked. This is caused
by the quota limit in dsl_dir_tempreserve_impl() being temporarily
decreased to the allocatable pool capacity less any deferred free
space.
This is resolved using the existing mechanism of returning ERESTART
when over quota as long as we know enough space will shortly be
available after processing the pending deferred frees.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #13172
Diffstat (limited to 'tests/runfiles')
-rw-r--r-- | tests/runfiles/common.run | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run index 609de105a..aefcd9843 100644 --- a/tests/runfiles/common.run +++ b/tests/runfiles/common.run @@ -686,7 +686,7 @@ tags = ['functional', 'nestedfs'] [tests/functional/no_space] tests = ['enospc_001_pos', 'enospc_002_pos', 'enospc_003_pos', - 'enospc_df'] + 'enospc_df', 'enospc_rm'] tags = ['functional', 'no_space'] [tests/functional/nopwrite] |