]> git.proxmox.com Git - mirror_zfs.git/commit
Fix ENOSPC for extended quota
authorAkash B <akash-b@hpe.com>
Thu, 28 Sep 2023 21:10:07 +0000 (02:40 +0530)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2023 21:10:07 +0000 (14:10 -0700)
commitba769ea3515f64cf18b587837bc0801ccefacb69
tree2a07f80788be067bc09ee3c1f256fdde551e30cf
parent5551dcd762d12265c4640cbce5ad4f1605c825ef
Fix ENOSPC for extended quota

When unlinking multiple files from a pool at 100% capacity, it
was possible for ENOSPC to be returned after the first few unlinks.
This issue was fixed previously by PR #13172 but then this was
again introduced by PR #13839.

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.

Also, updated the existing testcase which reliably reproduced the
issue without this patch.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Dipak Ghosh <dipak.ghosh@hpe.com>
Signed-off-by: Akash B <akash-b@hpe.com>
Closes #15312
module/zfs/dsl_dir.c
tests/zfs-tests/tests/functional/no_space/enospc_rm.ksh