hammer2 - Flush asynchronization, bug fixes, stabilization

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 17 March 2018 08:31 EDT

- Better-asynchronize the flush (sync) code. Generally split flushing of inodes and flushing of topology above the inodes such that we can flush the inodes inside a normal transaction.

This leaves only the topology flush in the flush transaction (which locks out all other modifying transactions). Concurrent read/write/ flush performance is significantly improved.

- Fix numerous bugs in the inode tracking code where the chain topology under an inode could wind up remaining in a modified state when the
vnode is in a clean state. This could cause hefty 'sync' latency on clean trees (that had already been flushed).

- Fix numerous bugs in the handling of lost parent links, which occurs due to locking races primarily when indirect blocks have to be inserted or deleted.

- Deleted-chain sub-topology tracking had some issues which could lead to chain's being lost, resulting in malloc complaints on umount.

- Rename a few H2 sysctl variables for readability.

- Adjust the "dumpchain" debugging directive to allow us to trace the ONFLUSH topology.

40498d1c88 hammer2 - Flush asynchronization, bug fixes, stabilization
sbin/hammer2/cmd_debug.c | 4 +-
sbin/hammer2/hammer2.h | 2 +-
sbin/hammer2/main.c | 14 ++--
sys/vfs/hammer2/hammer2.h | 23 ++---
sys/vfs/hammer2/hammer2_chain.c | 167 ++++++++++++++++++-------------------
sys/vfs/hammer2/hammer2_flush.c | 116 ++++++++++++++++++++++++--
sys/vfs/hammer2/hammer2_inode.c | 67 +++++++++++----
sys/vfs/hammer2/hammer2_io.c | 16 ++--
sys/vfs/hammer2/hammer2_ioctl.c | 12 +--
sys/vfs/hammer2/hammer2_strategy.c | 2 +-
sys/vfs/hammer2/hammer2_vfsops.c | 152 +++++++++++++++++++--------------
sys/vfs/hammer2/hammer2_vnops.c | 72 ++++++++++++----
12 files changed, 428 insertions(+), 219 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share