From: Zhilong Liu Date: Tue, 7 Mar 2017 03:13:03 +0000 (+0800) Subject: mdadm:add checking clustered bitmap in assemble mode X-Git-Tag: mdadm-4.1-rc1~257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72b616aff26e64079727ea908073027c08f99c07;p=thirdparty%2Fmdadm.git mdadm:add checking clustered bitmap in assemble mode mdadm:Both clustered and internal array don't need to specify --bitmap when assembling array. Signed-off-by: Zhilong Liu Acked-by: Coly Li Signed-off-by: Jes Sorensen --- diff --git a/mdadm.c b/mdadm.c index b5ac0611..d6ad8dc2 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1095,8 +1095,10 @@ int main(int argc, char *argv[]) pr_err("bitmap file needed with -b in --assemble mode\n"); exit(2); } - if (strcmp(optarg, "internal") == 0) { - pr_err("there is no need to specify --bitmap when assembling arrays with internal bitmaps\n"); + if (strcmp(optarg, "internal") == 0 || + strcmp(optarg, "clustered") == 0) { + pr_err("no need to specify --bitmap when assembling" + " arrays with internal or clustered bitmap\n"); continue; } bitmap_fd = open(optarg, O_RDWR);