summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-15 16:31:20 +1100
committerNeilBrown <neilb@suse.de>2011-03-15 16:31:20 +1100
commit1d8862cf613d671bcfbb796ca023161d2b907402 (patch)
treea8f2bb91a65a79b8ce585e5a33a81c49e2e8ed86
parent88b496c2697ed531ffecf2f8ced76f437297e5fe (diff)
downloadmdadm-1d8862cf613d671bcfbb796ca023161d2b907402.tar.gz
Fix regression when using 'grow' to add a bitmap.
When we allowed a devlist to accompany some --grow modes - but not --bitmap - we made --bitmap always fail, in stead of fail of a device was given to add. As 'devs_found' includes the md device, we need to compare against '1'. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--mdadm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index c44c432..e01beec 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1646,7 +1646,7 @@ int main(int argc, char *argv[])
}
} else if (bitmap_file) {
if (size >= 0 || raiddisks || chunk ||
- layout_str != NULL || devs_found) {
+ layout_str != NULL || devs_found > 1) {
fprintf(stderr, Name ": --bitmap changes cannot be "
"used with other geometry changes "
"in --grow mode\n");