diff options
author | Qu Wenruo <wqu@suse.com> | 2018-02-09 15:44:23 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-02-24 01:37:17 +0100 |
commit | f174972d2dd1f2e6c9ca62839061782a22971070 (patch) | |
tree | c6ba3ff150ac4e1717ea2f377345dc1c74a31314 /volumes.c | |
parent | 12becfe1220bb4e45e529d4d2363394431605deb (diff) |
btrfs-progs: volumes: Allow find_free_dev_extent() to return maximum hole size
Just as kernel find_free_dev_extent(), allow it to return maximum hole
size for us to build device list for later chunk allocator rework.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -516,10 +516,10 @@ out: } static int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes, - u64 *start) + u64 *start, u64 *len) { /* FIXME use last free of some kind */ - return find_free_dev_extent_start(device, num_bytes, 0, start, NULL); + return find_free_dev_extent_start(device, num_bytes, 0, start, len); } static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, @@ -543,7 +543,7 @@ static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, * is responsible to make sure it's free. */ if (!convert) { - ret = find_free_dev_extent(device, num_bytes, start); + ret = find_free_dev_extent(device, num_bytes, start, NULL); if (ret) goto err; } |