From 605e806166847872bb91831b397d58f95027975a Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Fri, 27 Jul 2012 08:37:55 -0400 Subject: 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 --- cmds-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds-device.c') diff --git a/cmds-device.c b/cmds-device.c index 771856bf..4787aca1 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -107,7 +107,8 @@ static int cmd_add_dev(int argc, char **argv) continue; } - res = btrfs_prepare_device(devfd, argv[i], 1, &dev_block_count, &mixed); + res = btrfs_prepare_device(devfd, argv[i], 1, &dev_block_count, + 0, &mixed, 0); if (res) { fprintf(stderr, "ERROR: Unable to init '%s'\n", argv[i]); close(devfd); -- cgit v1.2.3