hammer2 - Add feature to allow sector overwrite, fix meta-data check code
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Jul 2016 23:17:19 +0000 (16:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 9 Jul 2016 23:21:50 +0000 (16:21 -0700)
commit7fece146f268d677c46bde997079860f4cf553d0
tree1e5d811d2b56e8b7c5f57f9ab9b5bbab1d3f3d64
parentd26841ecab7b9e18efdfee9ce80b153c2dc3bb9a
hammer2 - Add feature to allow sector overwrite, fix meta-data check code

* If a file is set to use no check code (hammer2 setcheck none <file>),
  data overwrites will reuse the same sector as long as it does not violate
  the most recent snapshot.

  This allows the program to relax copy-on-write requirements for certain
  files, for example files which might be mmap()'d SHARED+RW and then
  modified constantly where the programmer has determined that the
  possibility of corruption is ok.

* Implement pfs_lsnap_tid in the PFS root inode meta-data.  This records the
  last snapshot TID so the chain code can determine if an overwrite is
  allowed.

* Remove attr_tid and dirent_tid from the inode meta-data for now.

* Only BREF_TYPE_DATA brefs inherit the inode check mode.  Meta-data brefs
  such as indirect blocks, or directory entries, will only use the check
  code type specified in the parent inode if it is not NONE.  Otherwise
  they will use the default check code.

  This fixes a bug where meta-data brefs could wind up being unchecked.  We
  want all meta-data to always be checked (at least for now).
sys/vfs/hammer2/DESIGN
sys/vfs/hammer2/hammer2.h
sys/vfs/hammer2/hammer2_chain.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_ioctl.c
sys/vfs/hammer2/hammer2_strategy.c
sys/vfs/hammer2/hammer2_synchro.c
sys/vfs/hammer2/hammer2_xops.c