* [PATCH v1] mdadm: add checking clustered bitmap in assemble mode
@ 2017-03-02 3:25 Zhilong Liu
2017-03-02 4:25 ` Coly Li
2017-03-06 21:32 ` jes.sorensen
0 siblings, 2 replies; 5+ messages in thread
From: Zhilong Liu @ 2017-03-02 3:25 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: linux-raid, Zhilong Liu
Both clustered and internal array don't need to specify
--bitmap when assembling array.
Signed-off-by: Zhilong Liu <zlliu@suse.com>
diff --git a/mdadm.c b/mdadm.c
index b5d89e4..4087f77 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);
--
2.6.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] mdadm: add checking clustered bitmap in assemble mode
2017-03-02 3:25 [PATCH v1] mdadm: add checking clustered bitmap in assemble mode Zhilong Liu
@ 2017-03-02 4:25 ` Coly Li
2017-03-06 21:32 ` jes.sorensen
1 sibling, 0 replies; 5+ messages in thread
From: Coly Li @ 2017-03-02 4:25 UTC (permalink / raw)
To: Zhilong Liu, Jes.Sorensen; +Cc: linux-raid
On 2017/3/2 上午11:25, Zhilong Liu wrote:
> 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>
>
> diff --git a/mdadm.c b/mdadm.c
> index b5d89e4..4087f77 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);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] mdadm: add checking clustered bitmap in assemble mode
2017-03-02 3:25 [PATCH v1] mdadm: add checking clustered bitmap in assemble mode Zhilong Liu
2017-03-02 4:25 ` Coly Li
@ 2017-03-06 21:32 ` jes.sorensen
2017-03-07 3:13 ` [PATCH v2] mdadm:add " Zhilong Liu
1 sibling, 1 reply; 5+ messages in thread
From: jes.sorensen @ 2017-03-06 21:32 UTC (permalink / raw)
To: Zhilong Liu; +Cc: linux-raid
Zhilong Liu <zlliu@suse.com> writes:
> Both clustered and internal array don't need to specify
> --bitmap when assembling array.
>
> Signed-off-by: Zhilong Liu <zlliu@suse.com>
>
> diff --git a/mdadm.c b/mdadm.c
> index b5d89e4..4087f77 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);
This doesn't build - could you please send me a working patch.
Thanks,
Jes
cc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" -DMAP_DIR=\"/run/mdadm\" -DMAP_FILE=\"map\" -DMDMON_DIR=\"/run/mdadm\" -DFAILED_SLOTS_DIR=\"/run/mdadm/failed-slots\" -DNO_COROSYNC -DNO_DLM -DVERSION=\"4.0-6-g8383db9\" -DVERS_DATE="\"2017-03-06\"" -DUSE_PTHREADS -DBINDIR=\"/sbin\" -c -o mdadm.o mdadm.c
mdadm.c: In function ‘main’:
mdadm.c:1100:12: error: missing terminating " character [-Werror]
pr_err("no need to specify --bitmap when assembling
^
mdadm.c:1101:48: error: missing terminating " character [-Werror]
arrays with internal or clustered bitmap\n");
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] mdadm:add checking clustered bitmap in assemble mode
2017-03-06 21:32 ` jes.sorensen
@ 2017-03-07 3:13 ` Zhilong Liu
2017-03-07 16:57 ` jes.sorensen
0 siblings, 1 reply; 5+ messages in thread
From: Zhilong Liu @ 2017-03-07 3:13 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: linux-raid, Zhilong Liu
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>
diff --git a/mdadm.c b/mdadm.c
index b5ac061..d6ad8dc 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);
--
2.10.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mdadm:add checking clustered bitmap in assemble mode
2017-03-07 3:13 ` [PATCH v2] mdadm:add " Zhilong Liu
@ 2017-03-07 16:57 ` jes.sorensen
0 siblings, 0 replies; 5+ messages in thread
From: jes.sorensen @ 2017-03-07 16:57 UTC (permalink / raw)
To: Zhilong Liu; +Cc: linux-raid
Zhilong Liu <zlliu@suse.com> writes:
> 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>
This one looks good!
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-07 16:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-02 3:25 [PATCH v1] mdadm: add checking clustered bitmap in assemble mode Zhilong Liu
2017-03-02 4:25 ` Coly Li
2017-03-06 21:32 ` jes.sorensen
2017-03-07 3:13 ` [PATCH v2] mdadm:add " Zhilong Liu
2017-03-07 16:57 ` jes.sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.