summaryrefslogtreecommitdiff
path: root/btrfs-vol.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-07-27 08:37:55 -0400
committerDavid Sterba <dsterba@suse.cz>2012-10-02 13:02:48 +0200
commit605e806166847872bb91831b397d58f95027975a (patch)
tree94032f0e981816e4d36a74003abb5d7c757cd226 /btrfs-vol.c
parent45e9ec733deb73672c9bae3b1adf50f44bc8ae0c (diff)
Btrfs-progs: only enforce a maximum size if we specify one
My patch 04609add88ef8428d725de6ef60f46a3ff0dbc8e introduced a regression where if you mkfs'ed a group of disks with different sizes it limited the disks to the size of the first one that is specified. This was not the intent of my patch, I only want it to limit the size based on the -b option, so I've reworked the code to pass in a max block count and that fixes the issue. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'btrfs-vol.c')
-rw-r--r--btrfs-vol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/btrfs-vol.c b/btrfs-vol.c
index 0efdbc11..ad824bd8 100644
--- a/btrfs-vol.c
+++ b/btrfs-vol.c
@@ -150,7 +150,8 @@ int main(int ac, char **av)
if (cmd == BTRFS_IOC_ADD_DEV) {
int mixed = 0;
- ret = btrfs_prepare_device(devfd, device, 1, &dev_block_count, &mixed);
+ ret = btrfs_prepare_device(devfd, device, 1, &dev_block_count,
+ 0, &mixed, 0);
if (ret) {
fprintf(stderr, "Unable to init %s\n", device);
exit(1);