diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-22 12:36:34 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-22 12:36:34 -0400 |
commit | aa2dfb372a2a647beedac163ce6f8b0fcbefac29 (patch) | |
tree | ff64f4d4921df2f0fbe5b356dc9b2384c7957dc1 /fs/btrfs/volumes.h | |
parent | 945d8962ceee6bb273365d0bdf42f763225b290f (diff) | |
parent | 73c5de0051533cbdf2bb656586c3eb21a475aa7d (diff) |
Merge branch 'allocator' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne into inode_numbers
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 5669ae8ea1c9..05d5d199381a 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -144,6 +144,7 @@ struct btrfs_device_info { | |||
144 | struct btrfs_device *dev; | 144 | struct btrfs_device *dev; |
145 | u64 dev_offset; | 145 | u64 dev_offset; |
146 | u64 max_avail; | 146 | u64 max_avail; |
147 | u64 total_avail; | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | struct map_lookup { | 150 | struct map_lookup { |
@@ -157,21 +158,6 @@ struct map_lookup { | |||
157 | struct btrfs_bio_stripe stripes[]; | 158 | struct btrfs_bio_stripe stripes[]; |
158 | }; | 159 | }; |
159 | 160 | ||
160 | /* Used to sort the devices by max_avail(descending sort) */ | ||
161 | int btrfs_cmp_device_free_bytes(const void *dev_info1, const void *dev_info2); | ||
162 | |||
163 | /* | ||
164 | * sort the devices by max_avail, in which max free extent size of each device | ||
165 | * is stored.(Descending Sort) | ||
166 | */ | ||
167 | static inline void btrfs_descending_sort_devices( | ||
168 | struct btrfs_device_info *devices, | ||
169 | size_t nr_devices) | ||
170 | { | ||
171 | sort(devices, nr_devices, sizeof(struct btrfs_device_info), | ||
172 | btrfs_cmp_device_free_bytes, NULL); | ||
173 | } | ||
174 | |||
175 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, | 161 | int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start, |
176 | u64 end, u64 *length); | 162 | u64 end, u64 *length); |
177 | 163 | ||