btrfs: move btrfs_cmp_device_free_bytes to super.c
[deliverable/linux.git] / fs / btrfs / volumes.c
index 8b9fb8c7683da9fc2652281cb21c99bdcbab2f2e..a9f1fc23278bc7fc35d5553e735851ba587f6ece 100644 (file)
@@ -2282,19 +2282,6 @@ static noinline u64 chunk_bytes_by_type(u64 type, u64 calc_size,
                return calc_size * num_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)
-{
-       if (((struct btrfs_device_info *)dev_info1)->max_avail >
-           ((struct btrfs_device_info *)dev_info2)->max_avail)
-               return -1;
-       else if (((struct btrfs_device_info *)dev_info1)->max_avail <
-                ((struct btrfs_device_info *)dev_info2)->max_avail)
-               return 1;
-       else
-               return 0;
-}
-
 static int __btrfs_calc_nstripes(struct btrfs_fs_devices *fs_devices, u64 type,
                                 int *num_stripes, int *min_stripes,
                                 int *sub_stripes)
This page took 0.024316 seconds and 5 git commands to generate.