summaryrefslogtreecommitdiff
path: root/volumes.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-15 15:42:08 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-04-15 15:42:08 -0400
commit951fd7371c5719f0491e0a8a524cf5be43729412 (patch)
tree9930eafb1f6d38600e101c3c965b6a6723254000 /volumes.h
parent7e7628ec4ebec9a5046025b4a139d55ac3a69d49 (diff)
downloadbtrfs-progs-951fd7371c5719f0491e0a8a524cf5be43729412.tar.gz
Add chunk uuids and update multi-device back references
Block headers now store the chunk tree uuid Chunk items records the device uuid for each stripes Device extent items record better back refs to the chunk tree Block groups record better back refs to the chunk tree The chunk tree format has also changed. The objectid of BTRFS_CHUNK_ITEM_KEY used to be the logical offset of the chunk. Now it is a chunk tree id, with the logical offset being stored in the offset field of the key. This allows a single chunk tree to record multiple logical address spaces, upping the number of bytes indexed by a chunk tree from 2^64 to 2^128.
Diffstat (limited to 'volumes.h')
-rw-r--r--volumes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/volumes.h b/volumes.h
index b6edc54..07d1c0a 100644
--- a/volumes.h
+++ b/volumes.h
@@ -50,7 +50,7 @@ struct btrfs_device {
u64 type;
/* physical drive uuid (or lvm uuid) */
- u8 uuid[BTRFS_DEV_UUID_SIZE];
+ u8 uuid[BTRFS_UUID_SIZE];
};
struct btrfs_fs_devices {
@@ -82,7 +82,9 @@ struct btrfs_multi_bio {
int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
struct btrfs_device *device,
- u64 owner, u64 num_bytes, u64 *start);
+ u64 chunk_tree, u64 chunk_objectid,
+ u64 chunk_offset,
+ u64 num_bytes, u64 *start);
int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw,
u64 logical, u64 *length,
struct btrfs_multi_bio **multi_ret, int mirror_num);