btrfs: Clarify why Traverse() is not used in PreviousLeaf()
PreviousLeaf() navigates by tree structure rather than key value, making Traverse() unsuitable here. Add a comment to explain this instead of leaving an open TODO question. Change-Id: Icd93d483bea5d5dab939abbef1f9f628238041ed Reviewed-on: https://review.haiku-os.org/c/haiku/+/10458 Reviewed-by: Adrien Destugues <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
d693dd96fc
commit
aa194141c4
@@ -760,7 +760,8 @@ BTree::RemoveEntries(Transaction& transaction, Path* path,
|
||||
status_t
|
||||
BTree::PreviousLeaf(Path* path) const
|
||||
{
|
||||
// TODO: use Traverse() ???
|
||||
// Traverse() is not used here because it searches by key value,
|
||||
// while leaf navigation only requires following tree structure.
|
||||
int level = 0;
|
||||
int slot;
|
||||
Node* node = NULL;
|
||||
|
||||
Reference in New Issue
Block a user