hammer2 - More involved refactoring of chain_repparent, cleanup
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 16 Mar 2018 18:01:11 +0000 (11:01 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 17 Mar 2018 08:31:35 +0000 (01:31 -0700)
commit68b321c1c2fcb76069594715a2a617f08aeb59ec
tree9397699131d247ca0f67e877e86443a0a48dd676
parentf94a23f56fd5f24ff4fc3d894e8f9921fe5daf76
hammer2 - More involved refactoring of chain_repparent, cleanup

* 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.
23 files changed:
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_admin.c
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_ccms.c
sys/vfs/hammer2/hammer2_ccms.h
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_cluster.c
sys/vfs/hammer2/hammer2_disk.h
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_inode.c
sys/vfs/hammer2/hammer2_io.c
sys/vfs/hammer2/hammer2_iocom.c
sys/vfs/hammer2/hammer2_ioctl.c
sys/vfs/hammer2/hammer2_ioctl.h
sys/vfs/hammer2/hammer2_mount.h
sys/vfs/hammer2/hammer2_msgops.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_subr.c
sys/vfs/hammer2/hammer2_synchro.c
sys/vfs/hammer2/hammer2_vnops.c
sys/vfs/hammer2/hammer2_xops.c
sys/vfs/hammer2/hammer2_xxhash.h