HAMMER 32/many: Record holes, initial undo API, initial reblocking code
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 18 Mar 2008 05:19:16 +0000 (05:19 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 18 Mar 2008 05:19:16 +0000 (05:19 +0000)
commitbf686dbe109e04d50f3c63426cba46e299dbc0a5
tree54fa88294aefd27dffd2dc96d3ea0b95e037df09
parenteec72afb11c06ab3c7c60220e866f7ebf46f809f
HAMMER 32/many: Record holes, initial undo API, initial reblocking code

* Add code to record recent 'holes' created by the blockmap allocator
  due to the requirement that data blocks not cross a 16K hammer buffer
  boundary, in order to try to fill in the gaps with smaller chunks of data
  when possible.

  Currently a hole is not added for blockmap frees.  It is questionable
  whether it is a good idea to do it for frees or not, because it can
  interfere with the reblock code's attempt to completely free a big block.

* Add a reblocking ioctl which scans the B-Tree and reblocks leaf nodes,
  records, and data in partially empty big blocks to try to free up
  the entire big block.  Incomplete (needs to reblock internal B-Tree nodes
  and doesn't yet, needs a low-free-space mode which focuses on freeing
  a single large block).

* Add the API infrastructure required to implement the undo records,
  and implement the initial undo code (sans ordering requirements for
  writes).  Incomplete.
15 files changed:
sys/conf/files
sys/vfs/hammer/Makefile
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_reblock.c [new file with mode: 0644]
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_undo.c [new file with mode: 0644]
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c