diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-06-09 09:22:25 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-06-09 09:22:25 -0400 |
commit | 0cf6c620176a294bdf1bedddc492f6ae857e0019 (patch) | |
tree | 44d3a6cb53a966bce73db711dbcf031b89388e11 /fs/btrfs/ctree.h | |
parent | ad693af684757478e5fcb225aef319cab7ba6c75 (diff) |
Btrfs: remove device tree
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 105 |
1 files changed, 4 insertions, 101 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e93ba1a5c812..5ab25a0cb16a 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -16,11 +16,10 @@ extern struct kmem_cache *btrfs_path_cachep; | |||
16 | #define BTRFS_MAGIC "_BtRfS_M" | 16 | #define BTRFS_MAGIC "_BtRfS_M" |
17 | 17 | ||
18 | #define BTRFS_ROOT_TREE_OBJECTID 1ULL | 18 | #define BTRFS_ROOT_TREE_OBJECTID 1ULL |
19 | #define BTRFS_DEV_TREE_OBJECTID 2ULL | 19 | #define BTRFS_EXTENT_TREE_OBJECTID 2ULL |
20 | #define BTRFS_EXTENT_TREE_OBJECTID 3ULL | 20 | #define BTRFS_FS_TREE_OBJECTID 3ULL |
21 | #define BTRFS_FS_TREE_OBJECTID 4ULL | 21 | #define BTRFS_ROOT_TREE_DIR_OBJECTID 4ULL |
22 | #define BTRFS_ROOT_TREE_DIR_OBJECTID 5ULL | 22 | #define BTRFS_FIRST_FREE_OBJECTID 5ULL |
23 | #define BTRFS_FIRST_FREE_OBJECTID 6ULL | ||
24 | 23 | ||
25 | /* | 24 | /* |
26 | * we can actually store much bigger names, but lets not confuse the rest | 25 | * we can actually store much bigger names, but lets not confuse the rest |
@@ -111,12 +110,6 @@ struct btrfs_super_block { | |||
111 | __le64 total_blocks; | 110 | __le64 total_blocks; |
112 | __le64 blocks_used; | 111 | __le64 blocks_used; |
113 | __le64 root_dir_objectid; | 112 | __le64 root_dir_objectid; |
114 | __le64 last_device_id; | ||
115 | /* fields below here vary with the underlying disk */ | ||
116 | __le64 device_block_start; | ||
117 | __le64 device_num_blocks; | ||
118 | __le64 device_root; | ||
119 | __le64 device_id; | ||
120 | } __attribute__ ((__packed__)); | 113 | } __attribute__ ((__packed__)); |
121 | 114 | ||
122 | /* | 115 | /* |
@@ -251,11 +244,6 @@ struct btrfs_csum_item { | |||
251 | u8 csum; | 244 | u8 csum; |
252 | } __attribute__ ((__packed__)); | 245 | } __attribute__ ((__packed__)); |
253 | 246 | ||
254 | struct btrfs_device_item { | ||
255 | __le16 pathlen; | ||
256 | __le64 device_id; | ||
257 | } __attribute__ ((__packed__)); | ||
258 | |||
259 | /* tag for the radix tree of block groups in ram */ | 247 | /* tag for the radix tree of block groups in ram */ |
260 | #define BTRFS_BLOCK_GROUP_DIRTY 0 | 248 | #define BTRFS_BLOCK_GROUP_DIRTY 0 |
261 | #define BTRFS_BLOCK_GROUP_AVAIL 1 | 249 | #define BTRFS_BLOCK_GROUP_AVAIL 1 |
@@ -286,11 +274,9 @@ struct btrfs_fs_info { | |||
286 | spinlock_t hash_lock; | 274 | spinlock_t hash_lock; |
287 | struct btrfs_root *extent_root; | 275 | struct btrfs_root *extent_root; |
288 | struct btrfs_root *tree_root; | 276 | struct btrfs_root *tree_root; |
289 | struct btrfs_root *dev_root; | ||
290 | struct radix_tree_root fs_roots_radix; | 277 | struct radix_tree_root fs_roots_radix; |
291 | struct radix_tree_root pending_del_radix; | 278 | struct radix_tree_root pending_del_radix; |
292 | struct radix_tree_root pinned_radix; | 279 | struct radix_tree_root pinned_radix; |
293 | struct radix_tree_root dev_radix; | ||
294 | struct radix_tree_root block_group_radix; | 280 | struct radix_tree_root block_group_radix; |
295 | struct radix_tree_root block_group_data_radix; | 281 | struct radix_tree_root block_group_data_radix; |
296 | struct radix_tree_root extent_map_radix; | 282 | struct radix_tree_root extent_map_radix; |
@@ -386,11 +372,6 @@ struct btrfs_root { | |||
386 | #define BTRFS_BLOCK_GROUP_ITEM_KEY 34 | 372 | #define BTRFS_BLOCK_GROUP_ITEM_KEY 34 |
387 | 373 | ||
388 | /* | 374 | /* |
389 | * dev items list the devices that make up the FS | ||
390 | */ | ||
391 | #define BTRFS_DEV_ITEM_KEY 35 | ||
392 | |||
393 | /* | ||
394 | * string items are for debugging. They just store a short string of | 375 | * string items are for debugging. They just store a short string of |
395 | * data in the FS | 376 | * data in the FS |
396 | */ | 377 | */ |
@@ -880,62 +861,6 @@ static inline void btrfs_set_super_root_dir(struct btrfs_super_block *s, u64 | |||
880 | s->root_dir_objectid = cpu_to_le64(val); | 861 | s->root_dir_objectid = cpu_to_le64(val); |
881 | } | 862 | } |
882 | 863 | ||
883 | static inline u64 btrfs_super_last_device_id(struct btrfs_super_block *s) | ||
884 | { | ||
885 | return le64_to_cpu(s->last_device_id); | ||
886 | } | ||
887 | |||
888 | static inline void btrfs_set_super_last_device_id(struct btrfs_super_block *s, | ||
889 | u64 val) | ||
890 | { | ||
891 | s->last_device_id = cpu_to_le64(val); | ||
892 | } | ||
893 | |||
894 | static inline u64 btrfs_super_device_id(struct btrfs_super_block *s) | ||
895 | { | ||
896 | return le64_to_cpu(s->device_id); | ||
897 | } | ||
898 | |||
899 | static inline void btrfs_set_super_device_id(struct btrfs_super_block *s, | ||
900 | u64 val) | ||
901 | { | ||
902 | s->device_id = cpu_to_le64(val); | ||
903 | } | ||
904 | |||
905 | static inline u64 btrfs_super_device_block_start(struct btrfs_super_block *s) | ||
906 | { | ||
907 | return le64_to_cpu(s->device_block_start); | ||
908 | } | ||
909 | |||
910 | static inline void btrfs_set_super_device_block_start(struct btrfs_super_block | ||
911 | *s, u64 val) | ||
912 | { | ||
913 | s->device_block_start = cpu_to_le64(val); | ||
914 | } | ||
915 | |||
916 | static inline u64 btrfs_super_device_num_blocks(struct btrfs_super_block *s) | ||
917 | { | ||
918 | return le64_to_cpu(s->device_num_blocks); | ||
919 | } | ||
920 | |||
921 | static inline void btrfs_set_super_device_num_blocks(struct btrfs_super_block | ||
922 | *s, u64 val) | ||
923 | { | ||
924 | s->device_num_blocks = cpu_to_le64(val); | ||
925 | } | ||
926 | |||
927 | static inline u64 btrfs_super_device_root(struct btrfs_super_block *s) | ||
928 | { | ||
929 | return le64_to_cpu(s->device_root); | ||
930 | } | ||
931 | |||
932 | static inline void btrfs_set_super_device_root(struct btrfs_super_block | ||
933 | *s, u64 val) | ||
934 | { | ||
935 | s->device_root = cpu_to_le64(val); | ||
936 | } | ||
937 | |||
938 | |||
939 | static inline u8 *btrfs_leaf_data(struct btrfs_leaf *l) | 864 | static inline u8 *btrfs_leaf_data(struct btrfs_leaf *l) |
940 | { | 865 | { |
941 | return (u8 *)l->items; | 866 | return (u8 *)l->items; |
@@ -1031,28 +956,6 @@ static inline void btrfs_set_file_extent_num_blocks(struct | |||
1031 | e->num_blocks = cpu_to_le64(val); | 956 | e->num_blocks = cpu_to_le64(val); |
1032 | } | 957 | } |
1033 | 958 | ||
1034 | static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d) | ||
1035 | { | ||
1036 | return le16_to_cpu(d->pathlen); | ||
1037 | } | ||
1038 | |||
1039 | static inline void btrfs_set_device_pathlen(struct btrfs_device_item *d, | ||
1040 | u16 val) | ||
1041 | { | ||
1042 | d->pathlen = cpu_to_le16(val); | ||
1043 | } | ||
1044 | |||
1045 | static inline u64 btrfs_device_id(struct btrfs_device_item *d) | ||
1046 | { | ||
1047 | return le64_to_cpu(d->device_id); | ||
1048 | } | ||
1049 | |||
1050 | static inline void btrfs_set_device_id(struct btrfs_device_item *d, | ||
1051 | u64 val) | ||
1052 | { | ||
1053 | d->device_id = cpu_to_le64(val); | ||
1054 | } | ||
1055 | |||
1056 | static inline struct btrfs_root *btrfs_sb(struct super_block *sb) | 959 | static inline struct btrfs_root *btrfs_sb(struct super_block *sb) |
1057 | { | 960 | { |
1058 | return sb->s_fs_info; | 961 | return sb->s_fs_info; |