cvs commit: src/sys/vfs/hammer hammer.h hammer_alist.c hammer_alist.h hammer_btree.c hammer_btree.h hammer_cursor.h hammer_disk.h hammer_inode.c hammer_object.c hammer_ondisk.c hammer_recover.c hammer_spike.c hammer_transaction.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Sun Jan 20 16:01:26 PST 2008
dillon 2008/01/20 16:00:19 PST
DragonFly src repository
Modified files:
sys/vfs/hammer hammer.h hammer_alist.c hammer_alist.h
hammer_btree.c hammer_btree.h
hammer_cursor.h hammer_disk.h
hammer_inode.c hammer_object.c
hammer_ondisk.c hammer_recover.c
hammer_spike.c hammer_transaction.c
Log:
HAMMER 22/many: Recovery and B-Tree work.
* More work on the recovery code. Interlock cluster header loading with
the recovery operation and fix numerous bugs.
* Move some of the complexity of an AS-OF B-Tree lookup out of btree_search()
and into btree_lookup(). Now btree_search() can just fail normally and
btree_lookup() checks for the edge case. The situation that occurs is
this:
10 15 20
| |
LEAF1 LEAF2
(12) (18)
If the boundary only differs by the delete_tid element, and we are doing
a lookup AS-OF timestamp 14, we will traverse into LEAF1 which contains
no visible nodes (element @ timestamp 12 has been deleted as-of 14).
btree_lookup() now checks for the edge case and iterates the search
to locate the visible element (18) in LEAF2.
It's a bit more complex then that, but that's the basic issue.
* Fix a leaf-splitting case due to the new spike topology.
* Change the spike's ending element to be range-exclusive instead of range-
inclusive, matching all other end-range keys in HAMMER. Adjust the B-Tree
code to handle the case.
* Normalize debugging output into the volume:cluster:node_offset form
that the 'hammer show' utility uses.
Revision Changes Path
1.27 +10 -4 src/sys/vfs/hammer/hammer.h
1.10 +4 -0 src/sys/vfs/hammer/hammer_alist.c
1.6 +2 -2 src/sys/vfs/hammer/hammer_alist.h
1.22 +321 -306 src/sys/vfs/hammer/hammer_btree.c
1.10 +4 -0 src/sys/vfs/hammer/hammer_btree.h
1.9 +1 -0 src/sys/vfs/hammer/hammer_cursor.h
1.18 +1 -1 src/sys/vfs/hammer/hammer_disk.h
1.23 +0 -2 src/sys/vfs/hammer/hammer_inode.c
1.22 +8 -19 src/sys/vfs/hammer/hammer_object.c
1.23 +94 -33 src/sys/vfs/hammer/hammer_ondisk.c
1.5 +89 -48 src/sys/vfs/hammer/hammer_recover.c
1.10 +15 -6 src/sys/vfs/hammer/hammer_spike.c
1.8 +0 -11 src/sys/vfs/hammer/hammer_transaction.c
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer.h.diff?r1=1.26&r2=1.27&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_alist.c.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_alist.h.diff?r1=1.5&r2=1.6&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_btree.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_btree.h.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_cursor.h.diff?r1=1.8&r2=1.9&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_disk.h.diff?r1=1.17&r2=1.18&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_inode.c.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_object.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_ondisk.c.diff?r1=1.22&r2=1.23&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_recover.c.diff?r1=1.4&r2=1.5&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_spike.c.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/hammer/hammer_transaction.c.diff?r1=1.7&r2=1.8&f=u
More information about the Commits
mailing list