summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-03-24 15:02:07 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commit0d81ba5dbedef0c3970d6aa318aa84920943e6e3 (patch)
tree2c5256b4a4e4d544add986e654db56e660f4fb12 /fs/btrfs/ctree.h
parente085def2c4cc2d7c0c316376b4b66b86b10e3a4b (diff)
Btrfs: Move device information into the super block so it can be scanned
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 285fb7e4610..96a49321786 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -150,21 +150,11 @@ struct btrfs_dev_item {
/* minimal io size for this device */
__le32 sector_size;
- /* the kernel device number */
- __le64 rdev;
-
/* type and info about this device */
__le64 type;
- /* partition number, 0 for whole dev */
- __le32 partition;
-
- /* length of the name data at the end of the item */
- __le16 name_len;
-
- /* physical drive uuid (or lvm uuid) */
+ /* btrfs generated uuid for this device */
u8 uuid[BTRFS_DEV_UUID_SIZE];
- /* name goes here */
} __attribute__ ((__packed__));
struct btrfs_stripe {
@@ -255,6 +245,7 @@ struct btrfs_super_block {
__le32 sys_chunk_array_size;
u8 root_level;
u8 chunk_root_level;
+ struct btrfs_dev_item dev_item;
u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
} __attribute__ ((__packed__));
@@ -685,20 +676,12 @@ BTRFS_SETGET_FUNCS(device_io_align, struct btrfs_dev_item, io_align, 32);
BTRFS_SETGET_FUNCS(device_io_width, struct btrfs_dev_item, io_width, 32);
BTRFS_SETGET_FUNCS(device_sector_size, struct btrfs_dev_item, sector_size, 32);
BTRFS_SETGET_FUNCS(device_id, struct btrfs_dev_item, devid, 64);
-BTRFS_SETGET_FUNCS(device_rdev, struct btrfs_dev_item, rdev, 64);
-BTRFS_SETGET_FUNCS(device_partition, struct btrfs_dev_item, partition, 32);
-BTRFS_SETGET_FUNCS(device_name_len, struct btrfs_dev_item, name_len, 16);
static inline char *btrfs_device_uuid(struct btrfs_dev_item *d)
{
return (char *)d + offsetof(struct btrfs_dev_item, uuid);
}
-static inline char *btrfs_device_name(struct btrfs_dev_item *d)
-{
- return (char *)(d + 1);
-}
-
BTRFS_SETGET_FUNCS(chunk_owner, struct btrfs_chunk, owner, 64);
BTRFS_SETGET_FUNCS(chunk_stripe_len, struct btrfs_chunk, stripe_len, 64);
BTRFS_SETGET_FUNCS(chunk_io_align, struct btrfs_chunk, io_align, 32);