mdadm:checking level once mode has been set
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mdadm:bitmap cannot be set twicemdadm.c | +4 | 1 reply | |
| 2/4 | mdadm:external bitmap only supports ext filesystemCreate.c mdadm.c | +16 | 2 replies | |
| 3/4 | mdadm:triggers core dump when stat2devnm return NULLMonitor.c lib.c | +4 | 2 replies | |
| 3/4 | mdadm:triggers core dump when stat2devnm return NULLMonitor.c | +6 | 0 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by.
| Patch | NeilBrown |
|---|---|
| 1/4 | |
| 2/4 | |
| 3/4 | R-b |
| 3/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] mdadm:checking level once mode has been set
mdadm: it would be better to check --level ealier, because it would fall to different prompt if user forgets to specify the --level. such as:
./mdadm -CR /dev/md0 -b internal -n2 -x1 /dev/loop[0-2]
Signed-off-by Zhilong Liu <[email protected]>
Create.c +0 -4
@@ -125,10 +125,6 @@ int Create(struct supertype *st, char *mddev,memset (&info,0 ,sizeof (info));if (s->level == UnSet && st && st->ss->default_geometry) st->ss->default_geometry (st, &s->level,NULL ,NULL ); -if (s->level == UnSet) { -pr_err ("a RAID level is needed to create an array.\n" ); -return 1 ; - }if (s->raiddisks <4 && s->level ==6 ) {pr_err ("at least 4 raid-devices needed for level 6\n" );return 1 ;
mdadm.c +6 -0
@@ -350,6 +350,12 @@ int main(int argc, char *argv[])pr_err ("Must give -a/--add for devices to add: %s\n" , optarg);exit (2 ); } +if (devs_found >0 && s.level == UnSet && !devmode) { +if (mode ==CREATE || mode ==BUILD ) { +pr_err ("a RAID level is needed to create or build an array.\n" ); +exit (2 ); + } + } dv =xmalloc (sizeof (*dv)); dv->devname = optarg; dv->disposition = devmode;
Signature · 1 line
2.10.2