summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhilong Liu <zlliu@suse.com>2017-03-07 04:13:03 +0100
committerJes Sorensen <Jes.Sorensen@gmail.com>2017-03-07 17:56:33 +0100
commit72b616aff26e64079727ea908073027c08f99c07 (patch)
tree5f6ce3c56b216136775841259de0c6a92d04e4c7
parentmdadm:add man page for --symlinks (diff)
downloadmdadm-72b616aff26e64079727ea908073027c08f99c07.tar.xz
mdadm-72b616aff26e64079727ea908073027c08f99c07.zip
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 <zlliu@suse.com> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
-rw-r--r--mdadm.c6
1 files changed, 4 insertions, 2 deletions
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);