BTRFS: Add some missing constants
Chunk tree objectID is 3, 256 is the objectID of first created subvolume in fs tree, and also of first chunk tree (item in chunk tree). Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
1481c49cd1
commit
bd2dab1c73
@ -389,7 +389,7 @@ Volume::Mount(const char* deviceName, uint32 flags)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
// ready
|
||||
status = get_vnode(fFSVolume, BTRFS_OBJECT_ID_CHUNK_TREE,
|
||||
status = get_vnode(fFSVolume, BTRFS_FIRST_SUBVOLUME,
|
||||
(void**)&fRootNode);
|
||||
if (status != B_OK) {
|
||||
ERROR("could not create root node: get_vnode() failed!\n");
|
||||
@ -492,7 +492,7 @@ Volume::FindBlock(off_t logical, off_t& physical)
|
||||
btrfs_key search_key;
|
||||
search_key.SetOffset(logical);
|
||||
search_key.SetType(BTRFS_KEY_TYPE_CHUNK_ITEM);
|
||||
search_key.SetObjectID(BTRFS_OBJECT_ID_CHUNK_TREE);
|
||||
search_key.SetObjectID(BTRFS_OBJECT_ID_FIRST_CHUNK_TREE);
|
||||
btrfs_chunk* chunk;
|
||||
size_t chunk_length;
|
||||
status_t status = fChunkTree->FindPrevious(search_key, (void**)&chunk,
|
||||
|
@ -303,32 +303,34 @@ struct btrfs_extent_data {
|
||||
} _PACKED;
|
||||
|
||||
|
||||
#define BTRFS_SUPER_BLOCK_MAGIC "_BHRfS_M"
|
||||
#define BTRFS_SUPER_BLOCK_MAGIC "_BHRfS_M"
|
||||
#define BTRFS_FIRST_SUBVOLUME 256
|
||||
|
||||
#define BTRFS_OBJECT_ID_ROOT_TREE 1
|
||||
#define BTRFS_OBJECT_ID_EXTENT_TREE 2
|
||||
#define BTRFS_OBJECT_ID_DEV_TREE 4
|
||||
#define BTRFS_OBJECT_ID_FS_TREE 5
|
||||
#define BTRFS_OBJECT_ID_ROOT_TREE_DIR 6
|
||||
#define BTRFS_OBJECT_ID_CHECKSUM_TREE 7
|
||||
#define BTRFS_OBJECT_ID_CHUNK_TREE 256
|
||||
#define BTRFS_OBJECT_ID_ROOT_TREE 1
|
||||
#define BTRFS_OBJECT_ID_EXTENT_TREE 2
|
||||
#define BTRFS_OBJECT_ID_CHUNK_TREE 3
|
||||
#define BTRFS_OBJECT_ID_DEV_TREE 4
|
||||
#define BTRFS_OBJECT_ID_FS_TREE 5
|
||||
#define BTRFS_OBJECT_ID_ROOT_TREE_DIR 6
|
||||
#define BTRFS_OBJECT_ID_CHECKSUM_TREE 7
|
||||
#define BTRFS_OBJECT_ID_FIRST_CHUNK_TREE 256
|
||||
|
||||
#define BTRFS_KEY_TYPE_CHUNK_ITEM 228
|
||||
#define BTRFS_KEY_TYPE_DIR_ITEM 84
|
||||
#define BTRFS_KEY_TYPE_DIR_INDEX 96
|
||||
#define BTRFS_KEY_TYPE_EXTENT_DATA 108
|
||||
#define BTRFS_KEY_TYPE_INODE_ITEM 1
|
||||
#define BTRFS_KEY_TYPE_INODE_REF 12
|
||||
#define BTRFS_KEY_TYPE_ROOT_ITEM 132
|
||||
#define BTRFS_KEY_TYPE_XATTR_ITEM 24
|
||||
#define BTRFS_KEY_TYPE_CHUNK_ITEM 228
|
||||
#define BTRFS_KEY_TYPE_DIR_ITEM 84
|
||||
#define BTRFS_KEY_TYPE_DIR_INDEX 96
|
||||
#define BTRFS_KEY_TYPE_EXTENT_DATA 108
|
||||
#define BTRFS_KEY_TYPE_INODE_ITEM 1
|
||||
#define BTRFS_KEY_TYPE_INODE_REF 12
|
||||
#define BTRFS_KEY_TYPE_ROOT_ITEM 132
|
||||
#define BTRFS_KEY_TYPE_XATTR_ITEM 24
|
||||
|
||||
#define BTRFS_EXTENT_COMPRESS_NONE 0
|
||||
#define BTRFS_EXTENT_COMPRESS_ZLIB 1
|
||||
#define BTRFS_EXTENT_COMPRESS_LZO 2
|
||||
#define BTRFS_EXTENT_COMPRESS_NONE 0
|
||||
#define BTRFS_EXTENT_COMPRESS_ZLIB 1
|
||||
#define BTRFS_EXTENT_COMPRESS_LZO 2
|
||||
|
||||
#define BTRFS_EXTENT_DATA_INLINE 0
|
||||
#define BTRFS_EXTENT_DATA_REGULAR 1
|
||||
#define BTRFS_EXTENT_DATA_PRE 2
|
||||
#define BTRFS_EXTENT_DATA_INLINE 0
|
||||
#define BTRFS_EXTENT_DATA_REGULAR 1
|
||||
#define BTRFS_EXTENT_DATA_PRE 2
|
||||
|
||||
|
||||
struct file_cookie {
|
||||
|
Loading…
x
Reference in New Issue
Block a user