git: hammer2 - Refactor file unlink w/open descriptor
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Dec 11 13:50:16 PST 2013
commit 044541cda0f600de451eb349ab34dda763328d00
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed Dec 11 13:33:11 2013 -0800
hammer2 - Refactor file unlink w/open descriptor
* Remove the H2 special cases for the HAMMER2_CHAIN_DELETED flag. These
special cases existed to deal with the unlink-open-file case, but hackish
and didn't deal with all the issues (such as bulk-free scan code losing
track of the unlinked open file).
* Change the unlink case when the file is still open or mmap'd. Instead of
deleting the inode H2 will now move the inode to a hidden directory in
the mount root. This way the bulk freeing code still sees it.
When the inode is moved it is re-keyed to its inode number, thus guaranteed
not to conflict with anything else sitting in the hidden directory.
* Add code to create the hidden directory in the mount root if it does not
exist.
* Add code to wipe the contents of the hidden directory on-mount (as a crash
recovery mechanic).
Summary of changes:
sys/vfs/hammer2/hammer2.h | 10 +-
sys/vfs/hammer2/hammer2_chain.c | 5 +-
sys/vfs/hammer2/hammer2_disk.h | 3 +
sys/vfs/hammer2/hammer2_flush.c | 103 ++++-------------
sys/vfs/hammer2/hammer2_inode.c | 231 ++++++++++++++++++++++++++++++++-------
sys/vfs/hammer2/hammer2_ioctl.c | 2 +-
sys/vfs/hammer2/hammer2_vfsops.c | 51 ++++++---
sys/vfs/hammer2/hammer2_vnops.c | 33 ++++--
8 files changed, 279 insertions(+), 159 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/044541cda0f600de451eb349ab34dda763328d00
--
DragonFly BSD source repository
More information about the Commits
mailing list