diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-12-08 16:46:26 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-08 16:46:26 -0500 |
commit | a512bbf855ff0af474257475f2e6da7acd854f52 (patch) | |
tree | 1b2cfcf4152e09f32a6cb0bcbd798d5dab2f5490 /fs/btrfs/volumes.h | |
parent | d20f7043fa65659136c1a7c3c456eeeb5c6f431f (diff) |
Btrfs: superblock duplication
This patch implements superblock duplication. Superblocks
are stored at offset 16K, 64M and 256G on every devices.
Spaces used by superblocks are preserved by the allocator,
which uses a reverse mapping function to find the logical
addresses that correspond to superblocks. Thank you,
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index fcbdcb3ae13e..bdebe83c3195 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -28,7 +28,6 @@ struct btrfs_device { | |||
28 | struct list_head dev_alloc_list; | 28 | struct list_head dev_alloc_list; |
29 | struct btrfs_fs_devices *fs_devices; | 29 | struct btrfs_fs_devices *fs_devices; |
30 | struct btrfs_root *dev_root; | 30 | struct btrfs_root *dev_root; |
31 | struct buffer_head *pending_io; | ||
32 | struct bio *pending_bios; | 31 | struct bio *pending_bios; |
33 | struct bio *pending_bio_tail; | 32 | struct bio *pending_bio_tail; |
34 | int running_pending; | 33 | int running_pending; |
@@ -125,7 +124,10 @@ int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, | |||
125 | int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, | 124 | int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, |
126 | u64 logical, u64 *length, | 125 | u64 logical, u64 *length, |
127 | struct btrfs_multi_bio **multi_ret, int mirror_num); | 126 | struct btrfs_multi_bio **multi_ret, int mirror_num); |
128 | int btrfs_read_sys_array(struct btrfs_root *root); | 127 | int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, |
128 | u64 chunk_start, u64 physical, u64 devid, | ||
129 | u64 **logical, int *naddrs, int *stripe_len); | ||
130 | int btrfs_read_sys_array(struct btrfs_root *root, u64 sb_bytenr); | ||
129 | int btrfs_read_chunk_tree(struct btrfs_root *root); | 131 | int btrfs_read_chunk_tree(struct btrfs_root *root); |
130 | int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | 132 | int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, |
131 | struct btrfs_root *extent_root, u64 type); | 133 | struct btrfs_root *extent_root, u64 type); |