btrfs: Add error log for _Find()

This commit is contained in:
hyche 2017-12-16 04:29:05 +07:00 committed by Adrien Destugues
parent c91002a1db
commit 690d16c628
1 changed files with 6 additions and 1 deletions

View File

@ -681,8 +681,13 @@ BTree::_Find(Path* path, btrfs_key& wanted, void** _value, uint32* _size,
if (status != B_OK)
return status;
if (found.Type() != wanted.Type() && wanted.Type() != BTRFS_KEY_TYPE_ANY)
if (found.Type() != wanted.Type() && wanted.Type() != BTRFS_KEY_TYPE_ANY) {
ERROR("Find() not found wanted: %" B_PRIu64 " %" B_PRIu8 " %"
B_PRIu64 " found: %" B_PRIu64 " %" B_PRIu8 " %" B_PRIu64 "\n",
wanted.ObjectID(), wanted.Type(), wanted.Offset(), found.ObjectID(),
found.Type(), found.Offset());
return B_ENTRY_NOT_FOUND;
}
wanted = found;
return B_OK;