Also report errors when the free list is broken.

* This will cause the whole B+tree to be rewritten in that case, too.
* Added a TODO comment that describes an alternative solution for this.
This commit is contained in:
Axel Dörfler
2012-03-31 14:25:42 +02:00
parent 577265d14f
commit 09ec0ad9c3
@@ -709,6 +709,9 @@ BPlusTree::Validate(bool repair, bool& _errorsFound)
if (check.Visited(freeOffset)) {
dprintf("inode %" B_PRIdOFF ": free node at %" B_PRIdOFF
" circular!\n", fStream->ID(), freeOffset);
// TODO: if 'repair' is true, we could collect all unvisited nodes
// at the end, and put the into the free list
check.FoundError();
break;
}