git: hammer2 - Fix issue where deleted files sometimes linger until umount
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue Apr 26 10:07:05 PDT 2022
commit bb16050ede5e81262312893fc8aaa54959cf993b
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Mon Apr 25 20:04:01 2022 -0700
hammer2 - Fix issue where deleted files sometimes linger until umount
* Hammer2 was using a namecache heuristic to determine if a file being
deleted was still open or not, but had not coded any sort of fall-back
if the heuristic failed.
This created an issue where the inodes for deleted files would sometimes
linger until the filesystem is unmounted (typically at system shutdown).
If the system were to crash, these inodes would remain in the media
topology forever.
This case primarily occurs when a large number of files are being
deleted.
* Replace the heuristic with a proper interlock so H2 knows with certainty
whether a file being removed still has system refs on it or not.
Summary of changes:
sys/vfs/hammer2/hammer2.h | 2 +-
sys/vfs/hammer2/hammer2_inode.c | 65 +++++++++++++++++++++++++++--------------
sys/vfs/hammer2/hammer2_vnops.c | 61 ++++++++++++++++----------------------
3 files changed, 69 insertions(+), 59 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bb16050ede5e81262312893fc8aaa54959cf993b
--
DragonFly BSD source repository
More information about the Commits
mailing list