HAMMER 24B/many: Edge cases, cleanups
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Jan 2008 21:50:56 +0000 (21:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 25 Jan 2008 21:50:56 +0000 (21:50 +0000)
commit9582c7da2b7235594570fb96deab82b479440464
tree2bdcfea3586f98191b9396aa137ccac6169f16a1
parent95301c6ea3e5a64eea3804d3f99558d5e24c72f0
HAMMER 24B/many: Edge cases, cleanups

* Use create_tid instead of delete_tid in B-Tree key comparisons.  I
  actually used create_tid's originally, then switched to delete_tid's
  because historical searches could iterate forwards to locate
  matching records whereas using create_tid required a backwards
  iteration.

  However, because delete_tid's can be modified in-place (0 -> delete stamp),
  this introduced some rare edges cases that I had not considered.

  So go back to using create_tid's.  The iteration code actually just does
  a re-search now with a slightly different key, so no new code had
  to be written for the reverse-direction.  Create TIDs do not change once
  they are laid down so there are no additional cases to consider.

* Fix a missing create_tid initialization in hammer_object.c.
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.h
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_spike.c