BTRFS: Added retrieve sector size for later use
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
d87124efad
commit
7e8e6c2ebb
@ -266,7 +266,9 @@ Volume::Mount(const char* deviceName, uint32 flags)
|
||||
}
|
||||
|
||||
fBlockSize = fSuperBlock.BlockSize();
|
||||
fSectorSize = fSuperBlock.SectorSize();
|
||||
TRACE("block size %" B_PRIu32 "\n", fBlockSize);
|
||||
TRACE("sector size %" B_PRIu32 "\n", fSectorSize);
|
||||
|
||||
uint8* start = (uint8*)&fSuperBlock.system_chunk_array[0];
|
||||
uint8* end = (uint8*)&fSuperBlock.system_chunk_array[2048];
|
||||
|
@ -41,7 +41,9 @@ public:
|
||||
BTree* FSTree() const { return fFSTree; }
|
||||
BTree* RootTree() const { return fRootTree; }
|
||||
|
||||
uint32 SectorSize() const { return fSectorSize; }
|
||||
uint32 BlockSize() const { return fBlockSize; }
|
||||
|
||||
btrfs_super_block& SuperBlock() { return fSuperBlock; }
|
||||
|
||||
status_t LoadSuperBlock();
|
||||
@ -62,6 +64,7 @@ private:
|
||||
char fName[32];
|
||||
|
||||
uint32 fFlags;
|
||||
uint32 fSectorSize;
|
||||
uint32 fBlockSize;
|
||||
|
||||
void* fBlockCache;
|
||||
|
@ -178,6 +178,7 @@ struct btrfs_super_block {
|
||||
// implemented in Volume.cpp
|
||||
uint64 TotalSize() const { return B_LENDIAN_TO_HOST_INT64(total_size); }
|
||||
uint32 BlockSize() const { return B_LENDIAN_TO_HOST_INT32(node_size); }
|
||||
uint32 SectorSize() const { return B_LENDIAN_TO_HOST_INT32(sector_size); }
|
||||
uint64 RootDirObjectID() const
|
||||
{ return B_LENDIAN_TO_HOST_INT64(root_dir_object_id); }
|
||||
uint64 Generation() const
|
||||
|
Loading…
Reference in New Issue
Block a user