diff options
author | Arne Jansen <sensille@gmx.net> | 2011-04-12 04:43:21 -0400 |
---|---|---|
committer | Arne Jansen <sensille@gmx.net> | 2011-05-13 09:36:05 -0400 |
commit | bcd53741cc2af4342ac3ff6983bddc4a1b63b9b4 (patch) | |
tree | 5be83348abb93689effda63918fdec4fb0b5461c /fs/btrfs/volumes.c | |
parent | 7cf96da3ec7ca225acf4f284b0e904a1f5f98821 (diff) |
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
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8b9fb8c7683d..a9f1fc23278b 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2282,19 +2282,6 @@ static noinline u64 chunk_bytes_by_type(u64 type, u64 calc_size, | |||
2282 | return calc_size * num_stripes; | 2282 | return calc_size * num_stripes; |
2283 | } | 2283 | } |
2284 | 2284 | ||
2285 | /* Used to sort the devices by max_avail(descending sort) */ | ||
2286 | int btrfs_cmp_device_free_bytes(const void *dev_info1, const void *dev_info2) | ||
2287 | { | ||
2288 | if (((struct btrfs_device_info *)dev_info1)->max_avail > | ||
2289 | ((struct btrfs_device_info *)dev_info2)->max_avail) | ||
2290 | return -1; | ||
2291 | else if (((struct btrfs_device_info *)dev_info1)->max_avail < | ||
2292 | ((struct btrfs_device_info *)dev_info2)->max_avail) | ||
2293 | return 1; | ||
2294 | else | ||
2295 | return 0; | ||
2296 | } | ||
2297 | |||
2298 | static int __btrfs_calc_nstripes(struct btrfs_fs_devices *fs_devices, u64 type, | 2285 | static int __btrfs_calc_nstripes(struct btrfs_fs_devices *fs_devices, u64 type, |
2299 | int *num_stripes, int *min_stripes, | 2286 | int *num_stripes, int *min_stripes, |
2300 | int *sub_stripes) | 2287 | int *sub_stripes) |