Btrfs: Move device information into the super block so it can be scanned

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-03-24 15:02:07 -04:00
parent e085def2c4
commit 0d81ba5dbe
5 changed files with 23 additions and 91 deletions

View File

@ -21,7 +21,6 @@
struct btrfs_device {
struct list_head dev_list;
struct btrfs_root *dev_root;
struct btrfs_key dev_key;
struct block_device *bdev;
@ -43,22 +42,11 @@ struct btrfs_device {
/* minimal io size for this device */
u32 sector_size;
/* the kernel device number */
u64 rdev;
/* type and info about this device */
u64 type;
/* partition number, 0 for whole dev */
int partition;
/* length of the name data at the end of the item */
int name_len;
/* physical drive uuid (or lvm uuid) */
u8 uuid[BTRFS_DEV_UUID_SIZE];
char *name;
};
int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
@ -75,4 +63,5 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
void btrfs_mapping_init(struct btrfs_mapping_tree *tree);
void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree);
int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio);
int btrfs_read_super_device(struct btrfs_root *root, struct extent_buffer *buf);
#endif