HAMMER 29/many: Work on the blockmap, implement the freemap.
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Feb 2008 00:55:51 +0000 (00:55 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Feb 2008 00:55:51 +0000 (00:55 +0000)
commitc3be93f2eafed5a6de4027038b1c1718c911c694
treeae756aaec8de65aecd47a8e58a664942cf645000
parent2c40730b05d553ed5ab24588c3ff9afbf0c5f04d
HAMMER 29/many: Work on the blockmap, implement the freemap.

* Split the blockmap structure into a blockmap header (in the volume header),
  layer1, and layer2 structure.  The layer1 structure is 32 bytes, the
  layer2 structure is 16 bytes.

  Layer1:  262144 32-byte entries (18 bits)
  Layer2:  524288 16-byte entries (19 bits)
  Bigblock: 23 bits
  ----------------------------------
  Total: 60 bits (1 MTB == 1024 Petabytes)

* Start working on the allocation cycler, but it isn't finished yet.

* Implement the freemap.  The freemap is basically a special-cased blockmap.
  The top 8 bits of Layer1 are used as a volume identifier.  A physical
  offset can be looked up via freemap and the layer2 entry will indicate
  which virtual offset it has been mapped to.  This will allow us to
  reallocate blocks when contracting the size of a volume (or if we desire
  to reallocate the block generally).
sbin/hammer/hammer_util.h
sbin/hammer/ondisk.c
sbin/newfs_hammer/newfs_hammer.c
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_freemap.c
sys/vfs/hammer/hammer_vfsops.c