Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ENOSPC when unlinking multiple files from full pool #13172

Merged
merged 1 commit into from
Mar 8, 2022

Commits on Mar 7, 2022

  1. 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.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Mar 7, 2022
    Configuration menu
    Copy the full SHA
    fd418ea View commit details
    Browse the repository at this point in the history