hammer2 - More involved refactoring of chain_repparent, cleanup

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

- Remove unused locking flags (remove the NOLOCK and NOUNLOCK features).

- Add HAMMER2_RESOLVE_NONBLOCK to hammer2_chain_lock() for use only by hammer2_chain_getparent() and hammer2_chain_repparent().

- Refactor hammer2_chain_getparent() and hammer2_chain_repparent(). Add a hot-path that uses HAMMER2_RESOLVE_NONBLOCK. If this fails we now do a much more involved tracking operation via 'reptrack' to deal with races against indirect block deletions.

- Cleanup the copyright messages.

- Fix an issue where a sync could be held-up indefinitely by ongoing overlapping modifying operations.

- Install a proper initial inode count when creating a snapshot.

- Fix a deadlock in checkdirempty(). A chain lock was winding up being ordered incorrectly.

68b321c1c2 hammer2 - More involved refactoring of chain_repparent, cleanup
sys/vfs/hammer2/hammer2.h | 33 ++--
sys/vfs/hammer2/hammer2_admin.c | 2 +-
sys/vfs/hammer2/hammer2_bulkfree.c | 2 +-
sys/vfs/hammer2/hammer2_ccms.c | 2 +-
sys/vfs/hammer2/hammer2_ccms.h | 2 +-
sys/vfs/hammer2/hammer2_chain.c | 305 ++++++++++++++++++++++++++-----------
sys/vfs/hammer2/hammer2_cluster.c | 2 +-
sys/vfs/hammer2/hammer2_disk.h | 2 +-
sys/vfs/hammer2/hammer2_flush.c | 41 +++--
sys/vfs/hammer2/hammer2_freemap.c | 2 +-
sys/vfs/hammer2/hammer2_inode.c | 2 +-
sys/vfs/hammer2/hammer2_io.c | 2 +-
sys/vfs/hammer2/hammer2_iocom.c | 2 +-
sys/vfs/hammer2/hammer2_ioctl.c | 4 +-
sys/vfs/hammer2/hammer2_ioctl.h | 2 +-
sys/vfs/hammer2/hammer2_mount.h | 2 +-
sys/vfs/hammer2/hammer2_msgops.c | 2 +-
sys/vfs/hammer2/hammer2_strategy.c | 1 +
sys/vfs/hammer2/hammer2_subr.c | 2 +-
sys/vfs/hammer2/hammer2_synchro.c | 2 +-
sys/vfs/hammer2/hammer2_vnops.c | 5 +-
sys/vfs/hammer2/hammer2_xops.c | 40 ++---
sys/vfs/hammer2/hammer2_xxhash.h | 2 +-
23 files changed, 314 insertions(+), 147 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share