diff options
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 2a751246188a..ab5b1c49f352 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -144,7 +144,10 @@ struct btrfs_bio_stripe { | |||
144 | u64 length; /* only used for discard mappings */ | 144 | u64 length; /* only used for discard mappings */ |
145 | }; | 145 | }; |
146 | 146 | ||
147 | struct btrfs_multi_bio { | 147 | struct btrfs_bio; |
148 | typedef void (btrfs_bio_end_io_t) (struct btrfs_bio *bio, int err); | ||
149 | |||
150 | struct btrfs_bio { | ||
148 | atomic_t stripes_pending; | 151 | atomic_t stripes_pending; |
149 | bio_end_io_t *end_io; | 152 | bio_end_io_t *end_io; |
150 | struct bio *orig_bio; | 153 | struct bio *orig_bio; |
@@ -152,6 +155,7 @@ struct btrfs_multi_bio { | |||
152 | atomic_t error; | 155 | atomic_t error; |
153 | int max_errors; | 156 | int max_errors; |
154 | int num_stripes; | 157 | int num_stripes; |
158 | int mirror_num; | ||
155 | struct btrfs_bio_stripe stripes[]; | 159 | struct btrfs_bio_stripe stripes[]; |
156 | }; | 160 | }; |
157 | 161 | ||
@@ -179,7 +183,7 @@ struct map_lookup { | |||
179 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, | 183 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, |
180 | u64 end, u64 *length); | 184 | u64 end, u64 *length); |
181 | 185 | ||
182 | #define btrfs_multi_bio_size(n) (sizeof(struct btrfs_multi_bio) + \ | 186 | #define btrfs_bio_size(n) (sizeof(struct btrfs_bio) + \ |
183 | (sizeof(struct btrfs_bio_stripe) * (n))) | 187 | (sizeof(struct btrfs_bio_stripe) * (n))) |
184 | 188 | ||
185 | int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, | 189 | int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, |
@@ -188,7 +192,7 @@ int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, | |||
188 | u64 chunk_offset, u64 start, u64 num_bytes); | 192 | u64 chunk_offset, u64 start, u64 num_bytes); |
189 | int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, | 193 | int btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, |
190 | u64 logical, u64 *length, | 194 | u64 logical, u64 *length, |
191 | struct btrfs_multi_bio **multi_ret, int mirror_num); | 195 | struct btrfs_bio **bbio_ret, int mirror_num); |
192 | int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, | 196 | int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree, |
193 | u64 chunk_start, u64 physical, u64 devid, | 197 | u64 chunk_start, u64 physical, u64 devid, |
194 | u64 **logical, int *naddrs, int *stripe_len); | 198 | u64 **logical, int *naddrs, int *stripe_len); |