HomeFreeBSD

VFS: add retry limit and delay for failed recursive unmounts

Description

VFS: add retry limit and delay for failed recursive unmounts

A forcible unmount attempt may fail due to a transient condition, but
it may also fail due to some issue in the filesystem implementation
that will indefinitely prevent successful unmount. In such a case,
the retry logic in the recursive unmount facility will cause the
deferred unmount taskqueue to execute constantly.

Avoid this scenario by imposing a retry limit, with a default value
of 10, beyond which the recursive unmount facility will emit a log
message and give up. Additionally, introduce a grace period, with
a default value of 1s, between successive unmount retries on the
same mount.

Create a new sysctl node, vfs.deferred_unmount, to export the total
number of failed recursive unmount attempts since boot, and to allow
the retry limit and retry grace period to be tuned.

Reviewed by: kib (earlier revision), mkusick
Differential Revision: https://reviews.freebsd.org/D31450

Details

Provenance
jahAuthored on Aug 8 2021, 5:29 AM
Reviewer
kib
Differential Revision
D31450: VFS: add retry limit and delay for failed recursive unmounts
Parents
rG9781c28c6d63: mpr(4): Fix unmatched devq release.
Branches
Unknown
Tags
Unknown