git: hammer2 - Implement crash recovery, cleanups, stabilization
dillon at crater.dragonflybsd.org
Wed Nov 13 20:34:49 PST 2013
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed Nov 13 20:23:02 2013 -0800
hammer2 - Implement crash recovery, cleanups, stabilization
* Allocations which are made by the flush itself run in the next
transaction instead of the current transaction. We do this so the
flush code can flush a stable version of the freemap itself.
* Implement crash recovery. Due to the above mechanics an incremental
scan must be run at mount-time of all chains belonging to the last
transaction and ensure that the blocks are marked allocated in the
freemap. Since the scan is incremental this doesn't take very long.
* Add some chain API infrastructure to support the incremental scan.
* Allow transactions to operate on a single media mount point (hmp)
(verses a pfsmount (pmp)). Used by the recovery code.
* Take another pass on the flush algorithm, fixing a few bugs. The
filter is still pretty fragile unfortunately. Having to special-case
the root chains (hmp->vchain and hmp->fchain) is causing problems.
Add debugging to help figure out an assertion that still occurs.
Summary of changes:
sbin/hammer2/cmd_debug.c | 3 +
sys/vfs/hammer2/hammer2.h | 27 ++--
sys/vfs/hammer2/hammer2_chain.c | 257 ++++++++++++++++++++++++++++++++++----
sys/vfs/hammer2/hammer2_flush.c | 142 +++++++++++++--------
sys/vfs/hammer2/hammer2_freemap.c | 149 +++++++++++++++++-----
sys/vfs/hammer2/hammer2_inode.c | 14 +--
sys/vfs/hammer2/hammer2_ioctl.c | 8 +-
sys/vfs/hammer2/hammer2_vfsops.c | 218 +++++++++++++++++++++++++++++---
sys/vfs/hammer2/hammer2_vnops.c | 29 ++---
9 files changed, 689 insertions(+), 158 deletions(-)
DragonFly BSD source repository
More information about the Commits