hammer2 - Stabilize new I/O infrastructure and work on bulkfree

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 26 January 2015 17:48 UTC

- Stabilize the new asynchronous hammer_io infrastructure.

- Document the new simpler bulkfree scan algorithm. The new algorithm scans meta-data in two passes, rebuilding the freemap in kernel memory. It then compares the map against the live media.

The first pass transitions the freemap from (11 = allocated) to (10 = staged for deletion), the second pass transitions (10) either back to (11) if the block is found to not actually be freeable or to (00) if the block winds up being actually freeable.

The two pass mechanism deals with any races and allows the scan to occur essentially unlocked,

- Start work on the bulkfree scan algorithm.

3148f67 hammer2 - Stabilize new I/O infrastructure and work on bulkfree
sys/vfs/hammer2/FREEMAP | 182 +++++++++--------
sys/vfs/hammer2/Makefile | 2 +-
sys/vfs/hammer2/hammer2.h | 19 +-
sys/vfs/hammer2/hammer2_bulkscan.c | 380 ++++++++++++++++++++++++++++++++++++
sys/vfs/hammer2/hammer2_chain.c | 10 +
sys/vfs/hammer2/hammer2_disk.h | 74 ++++++-
sys/vfs/hammer2/hammer2_freemap.c | 45 ++---
sys/vfs/hammer2/hammer2_io.c | 130 ++++++++----
sys/vfs/hammer2/hammer2_ioctl.c | 20 +-
sys/vfs/hammer2/hammer2_ioctl.h | 18 +-
sys/vfs/hammer2/hammer2_vnops.c | 58 ++++--
11 files changed, 751 insertions(+), 187 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share