From 4ba7b70ff3fcc3f5bab5a58ba86d678c9f6c6d9d Mon Sep 17 00:00:00 2001 From: hyche Date: Sun, 2 Jul 2017 23:55:42 +0700 Subject: [PATCH] BTRFS: Added more flags and key types --- src/add-ons/kernel/file_systems/btrfs/btrfs.h | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/file_systems/btrfs/btrfs.h b/src/add-ons/kernel/file_systems/btrfs/btrfs.h index 3a0d3ea232..54e4634b3b 100644 --- a/src/add-ons/kernel/file_systems/btrfs/btrfs.h +++ b/src/add-ons/kernel/file_systems/btrfs/btrfs.h @@ -427,22 +427,38 @@ struct btrfs_extent_data_ref { #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_INODE_ITEM 1 +#define BTRFS_KEY_TYPE_INODE_REF 12 +#define BTRFS_KEY_TYPE_XATTR_ITEM 24 #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_EXTENT_ITEM 168 +#define BTRFS_KEY_TYPE_METADATA_ITEM 169 +#define BTRFS_KEY_TYPE_EXTENT_DATA_REF 178 +#define BTRFS_KEY_TYPE_BLOCKGROUP_ITEM 192 +#define BTRFS_KEY_TYPE_CHUNK_ITEM 228 #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_FLAG_DATA 1 +#define BTRFS_EXTENT_FLAG_TREE_BLOCK 2 + +#define BTRFS_BLOCKGROUP_FLAG_DATA 1 +#define BTRFS_BLOCKGROUP_FLAG_SYSTEM 2 +#define BTRFS_BLOCKGROUP_FLAG_METADA 4 +#define BTRFS_BLOCKGROUP_FLAG_RAID0 8 +#define BTRFS_BLOCKGROUP_FLAG_RAID1 16 +#define BTRFS_BLOCKGROUP_FLAG_DUP 32 +#define BTRFS_BLOCKGROUP_FLAG_RAID10 64 +#define BTRFS_BLOCKGROUP_FLAG_RAID5 128 +#define BTRFS_BLOCKGROUP_FLAG_RAID6 256 +#define BTRFS_BLOCKGROUP_FLAG_MASK 511 struct file_cookie {