dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/mdadm-add-checking-clustered2-bitmap-in-assemble-mode.patch

2c1b57
From 72b616aff26e64079727ea908073027c08f99c07 Mon Sep 17 00:00:00 2001
2c1b57
From: Zhilong Liu <zlliu@suse.com>
2c1b57
Date: Tue, 7 Mar 2017 11:13:03 +0800
2c1b57
Subject: [RHEL7.5 PATCH 008/169] mdadm:add checking clustered bitmap in
2c1b57
 assemble mode
2c1b57
2c1b57
mdadm:Both clustered and internal array don't need
2c1b57
to specify --bitmap when assembling array.
2c1b57
2c1b57
Signed-off-by: Zhilong Liu <zlliu@suse.com>
2c1b57
Acked-by: Coly Li <colyli@suse.de>
2c1b57
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
2c1b57
---
2c1b57
 mdadm.c | 6 ++++--
2c1b57
 1 file changed, 4 insertions(+), 2 deletions(-)
2c1b57
2c1b57
diff --git a/mdadm.c b/mdadm.c
2c1b57
index b5ac061..d6ad8dc 100644
2c1b57
--- a/mdadm.c
2c1b57
+++ b/mdadm.c
2c1b57
@@ -1095,8 +1095,10 @@ int main(int argc, char *argv[])
2c1b57
 				pr_err("bitmap file needed with -b in --assemble mode\n");
2c1b57
 				exit(2);
2c1b57
 			}
2c1b57
-			if (strcmp(optarg, "internal") == 0) {
2c1b57
-				pr_err("there is no need to specify --bitmap when assembling arrays with internal bitmaps\n");
2c1b57
+			if (strcmp(optarg, "internal") == 0 ||
2c1b57
+			    strcmp(optarg, "clustered") == 0) {
2c1b57
+				pr_err("no need to specify --bitmap when assembling"
2c1b57
+					" arrays with internal or clustered bitmap\n");
2c1b57
 				continue;
2c1b57
 			}
2c1b57
 			bitmap_fd = open(optarg, O_RDWR);
2c1b57
-- 
2c1b57
2.7.4
2c1b57