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:
@@ -709,6 +709,9 @@ BPlusTree::Validate(bool repair, bool& _errorsFound)
|
|||||||
if (check.Visited(freeOffset)) {
|
if (check.Visited(freeOffset)) {
|
||||||
dprintf("inode %" B_PRIdOFF ": free node at %" B_PRIdOFF
|
dprintf("inode %" B_PRIdOFF ": free node at %" B_PRIdOFF
|
||||||
" circular!\n", fStream->ID(), freeOffset);
|
" 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user