diff options
-rw-r--r-- | Assemble.c | 2 | ||||
-rw-r--r-- | md_p.h | 2 | ||||
-rw-r--r-- | super-ddf.c | 2 | ||||
-rw-r--r-- | super1.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -777,7 +777,7 @@ int Assemble(struct supertype *st, char *mddev, * as they don't make sense */ if (content->array.level != -4) - if (!(devices[j].i.disk.state & (1<<MD_DISK_SYNC))) { + if (!(devices[j].i.disk.state & (1<<MD_DISK_ACTIVE))) { if (!(devices[j].i.disk.state & (1<<MD_DISK_FAULTY))) sparecnt++; @@ -75,7 +75,7 @@ * Device "operational" state bits */ #define MD_DISK_FAULTY 0 /* disk is faulty / operational */ -#define MD_DISK_ACTIVE 1 /* disk is running or spare disk */ +#define MD_DISK_ACTIVE 1 /* disk is running but may not be in sync */ #define MD_DISK_SYNC 2 /* disk is in sync with the raid set */ #define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */ diff --git a/super-ddf.c b/super-ddf.c index 06858e2..80df570 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1366,7 +1366,7 @@ static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info) info->disk.raid_disk = -1; // info->disk.raid_disk = find refnum in the table and use index; } - info->disk.state = (1 << MD_DISK_SYNC); + info->disk.state = (1 << MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE); info->reshape_active = 0; @@ -594,7 +594,7 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info) info->disk.raid_disk = -1; switch(role) { case 0xFFFF: - info->disk.state = 2; /* spare: ACTIVE, not sync, not faulty */ + info->disk.state = 0; /* spare: not active, not sync, not faulty */ break; case 0xFFFE: info->disk.state = 1; /* faulty */ |