> 在 2017年3月1日,20:03,Coly Li <colyli@xxxxxxx> 写道: > >> On 2017/3/1 下午3:47, Zhilong Liu wrote: >> 1. both clustered and internal array don't need to specify >> --bitmap when assembling array. >> 2. clustered array doesn't support external bitmap mode. >> >> Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx> >> >> diff --git a/mdadm.c b/mdadm.c >> index b5d89e4..b08cace 100644 >> --- a/mdadm.c >> +++ b/mdadm.c >> @@ -1095,8 +1095,14 @@ 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 bitmaps\n"); > > Is it important for 80 characters width limitation ? > To keep good style, the suggestion is great. >> + continue; > > Here if optarg is "clustered", it will continue and won't check the > following strcmp. > >> + } >> + if (strcmp(optarg, "clustered") == 0 && >> + strchr(optarg, '/') != NULL) { > > I guess this check won't happen at all. Correct me if I am wrong. Yes, I should do this checking in 'create' and 'grow' mode. The first checking is enough in assemble mode. > >> + pr_err("clustered array doesn't support external bitmap\n"); >> continue; >> } >> bitmap_fd = open(optarg, O_RDWR); >> > > Thanks. > > Coly Many many thanks, Zhilong send from iPhone -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html