btrfs: move btrfs_cmp_device_free_bytes to super.c

this function won't be used here anymore, so move it super.c where it is
used for df-calculation
This commit is contained in:
Arne Jansen
2011-04-12 10:43:21 +02:00
parent 7cf96da3ec
commit bcd53741cc
3 changed files with 26 additions and 28 deletions

View File

@@ -157,21 +157,6 @@ struct map_lookup {
struct btrfs_bio_stripe stripes[];
};
/* Used to sort the devices by max_avail(descending sort) */
int btrfs_cmp_device_free_bytes(const void *dev_info1, const void *dev_info2);
/*
* sort the devices by max_avail, in which max free extent size of each device
* is stored.(Descending Sort)
*/
static inline void btrfs_descending_sort_devices(
struct btrfs_device_info *devices,
size_t nr_devices)
{
sort(devices, nr_devices, sizeof(struct btrfs_device_info),
btrfs_cmp_device_free_bytes, NULL);
}
int btrfs_account_dev_extents_size(struct btrfs_device *device, u64 start,
u64 end, u64 *length);