HomeFreeBSD

Fix ENOSPC for extended quota

Description

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

Details

Provenance
Akash B <akash-b@hpe.com>Authored on Sep 28 2023, 9:10 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 28 2023, 9:28 PM
Parents
rG9e36c5769fe1: Don't allocate from new metaslabs
Branches
Unknown
Tags
Unknown