summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-11-17 12:31:12 +1100
committerNeilBrown <neilb@suse.de>2009-11-17 12:31:12 +1100
commitdf0d4ea04e34fc5d499056b00fa1e0a25f21453e (patch)
treed8a0678434b8b9cfc2e1521956237ec2427ea473
parent672ca1b7272c69ea3055aeb746a77b8408e5f3ed (diff)
downloadmdadm-df0d4ea04e34fc5d499056b00fa1e0a25f21453e.tar.gz
mdadm-df0d4ea04e34fc5d499056b00fa1e0a25f21453e.tar.xz
mdadm-df0d4ea04e34fc5d499056b00fa1e0a25f21453e.zip
Replace all relevant occurrences of -4 with LEVEL_MULTIPATH
Also -1 -> LEVEL_LINEAR. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--Assemble.c4
-rw-r--r--mdassemble.c6
-rw-r--r--util.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/Assemble.c b/Assemble.c
index a16cafe..e1870fc 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -683,7 +683,7 @@ int Assemble(struct supertype *st, char *mddev,
> devices[most_recent].i.events)
most_recent = devcnt;
}
- if (content->array.level == -4)
+ if (content->array.level == LEVEL_MULTIPATH)
/* with multipath, the raid_disk from the superblock is meaningless */
i = devcnt;
else
@@ -776,7 +776,7 @@ int Assemble(struct supertype *st, char *mddev,
/* note: we ignore error flags in multipath arrays
* as they don't make sense
*/
- if (content->array.level != -4)
+ if (content->array.level != LEVEL_MULTIPATH)
if (!(devices[j].i.disk.state & (1<<MD_DISK_ACTIVE))) {
if (!(devices[j].i.disk.state
& (1<<MD_DISK_FAULTY)))
diff --git a/mdassemble.c b/mdassemble.c
index cf83795..d0d0707 100644
--- a/mdassemble.c
+++ b/mdassemble.c
@@ -28,7 +28,7 @@
/* from readme.c */
mapping_t pers[] = {
- { "linear", -1},
+ { "linear", LEVEL_LINEAR},
{ "raid0", 0},
{ "0", 0},
{ "stripe", 0},
@@ -39,8 +39,8 @@ mapping_t pers[] = {
{ "4", 4},
{ "raid5", 5},
{ "5", 5},
- { "multipath", -4},
- { "mp", -4},
+ { "multipath", LEVEL_MULTIPATH},
+ { "mp", LEVEL_MULTIPATH},
{ "raid6", 6},
{ "6", 6},
{ "raid10", 10},
diff --git a/util.c b/util.c
index 048c39f..a0e4bcf 100644
--- a/util.c
+++ b/util.c
@@ -261,9 +261,9 @@ int enough(int level, int raid_disks, int layout, int clean,
} while (first != 0);
return 1;
- case -4:
+ case LEVEL_MULTIPATH:
return avail_disks>= 1;
- case -1:
+ case LEVEL_LINEAR:
case 0:
return avail_disks == raid_disks;
case 1: