BTRFS: Added logical address (root) for BTree
This commit is contained in:
parent
7698541e6b
commit
370ee09fe5
@ -279,7 +279,9 @@ BTree::SetRoot(off_t logical, fsblock_t* block)
|
||||
{
|
||||
if (block != NULL) {
|
||||
fRootBlock = *block;
|
||||
//TODO: mapping physical block -> logical address
|
||||
} else {
|
||||
fLogicalRoot = logical;
|
||||
if (fVolume->FindBlock(logical, fRootBlock) != B_OK) {
|
||||
ERROR("Find() unmapped block %" B_PRId64 "\n", fRootBlock);
|
||||
return B_ERROR;
|
||||
|
@ -57,8 +57,8 @@ public:
|
||||
size_t* size = NULL);
|
||||
|
||||
status_t SetRoot(off_t logical, fsblock_t* block);
|
||||
|
||||
fsblock_t RootBlock() const { return fRootBlock; }
|
||||
off_t LogicalRoot() const { return fLogicalRoot; }
|
||||
|
||||
private:
|
||||
BTree(const BTree& other);
|
||||
@ -73,6 +73,7 @@ private:
|
||||
friend class TreeIterator;
|
||||
|
||||
fsblock_t fRootBlock;
|
||||
off_t fLogicalRoot;
|
||||
Volume* fVolume;
|
||||
mutex fIteratorLock;
|
||||
SinglyLinkedList<TreeIterator> fIterators;
|
||||
|
Loading…
x
Reference in New Issue
Block a user