hammer - Fix bugs, fix serious snapshot bug, flush adjustments
commit65c894ff16a220a372ab41a11f3865f2de518c9e
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 17 Mar 2018 08:20:36 +0000 (17 01:20 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 17 Mar 2018 08:31:35 +0000 (17 01:31 -0700)
tree19a24ce41bb1981d2afdb8edc7ae914a233fca45
parent68b321c1c2fcb76069594715a2a617f08aeb59ec
hammer - Fix bugs, fix serious snapshot bug, flush adjustments

* Make sure we only flush the volume header for a general sync request
  and not for a fsync() on /.

* Fix more lock order reversals when translating directory entries
  to inodes.

* Separate out spmp elements into their own list to make umount ordering
  easier.

* Flush in three stages.

  (1) flush dirty filesystem inodes
  (2) flush PFS meta-data topology up to the filesystem inodes.
  (3) flush the volume root and its meta-data up to the PFS inodes.

  This is staging for later sync concurrency improvements.

* Fix a bug where creating enough snapshots (more than 4 total PFSs)
  causes some PFSs to lose an important flag in their blockref, which
  causes flushes to stop working properly on that PFS.
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_bulkfree.c
sys/vfs/hammer2/hammer2_chain.c
sys/vfs/hammer2/hammer2_flush.c
sys/vfs/hammer2/hammer2_freemap.c
sys/vfs/hammer2/hammer2_vfsops.c
sys/vfs/hammer2/hammer2_xops.c