hammer2 - freemap and data check code
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 4 Aug 2014 08:11:46 +0000 (01:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 4 Aug 2014 08:11:46 +0000 (01:11 -0700)
commita71db85d9ad6015dbdba1b15106e08ea69fdd67d
treef44cc01505f26e800feda189c1a50428d6fbfdc5
parent5a790ddf95639ee29801ae3a81cf660bdc9c5ae4
hammer2 - freemap and data check code

* Change the freemap to use 8 sets = ~32 reserved blocks instead of 14 sets.
  Use a straight iterator.  (TODO - must invalidate newer volumes if an older
  volume backup is mounted RW because freemap will become inconsistent).

* Update the freemap documentation.  Requires more work.

* MODIFY_OPTDATA can only skip to the end if chain->data is NULL in
  the BREF_TYPE_DATA case.  chain->data might not be NULL if the
  data chain represents a compressed device buffer.

* Add check code generation and testing.  Currently just kprintf()s a
  warning if the check code does not match.  Implement iscsi crc-32,
  sha-192 (this is sha-256 with the last 64 bits XOR'd into the first),
  and implement check generation and testing for all data, meta-data,
  and the freemap.  For Everything.  64-bit CRCs are not yet implemented.

* Fix a few cases where the DIO or the chain was not being properly
  dirtied prior to making modifications to the media contents via
  chain->data (this showed up because CRC tests were failing).

* Cleanup:

  - CHAIN_FORCECOW is no longer used, remove it.
  - Move FLUSH_DEPTH_LIMIT from hammer2.h to hammer2_flush.c.
  - Remove debug structures from the blockref check union.
  - Remove some #if 0'd code that is no longer applicable.
sys/vfs/hammer2/FREEMAP
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_vfsops.c