]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm:add checking clustered bitmap in assemble mode
authorZhilong Liu <zlliu@suse.com>
Tue, 7 Mar 2017 03:13:03 +0000 (11:13 +0800)
committerJes Sorensen <Jes.Sorensen@gmail.com>
Tue, 7 Mar 2017 16:56:33 +0000 (11:56 -0500)
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>
mdadm.c

diff --git a/mdadm.c b/mdadm.c
index b5ac06113747657723bf71afc081762963e872bb..d6ad8dc28967e2886a2f4dee4146d1859010ace2 100644 (file)
--- 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);