summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-14 17:31:13 +1100
committerNeil Brown <neilb@suse.de>2006-12-14 17:31:13 +1100
commit583315d9c522c310c89d5640ae884ef7984b9c30 (patch)
treee3a1f9d2e617fc90460b7786fc01e8c255cbe211 /super1.c
parent757234466509aae6221c2cb96e8366f41ba7e532 (diff)
downloadmdadm-583315d9c522c310c89d5640ae884ef7984b9c30.tar.gz
mdadm-583315d9c522c310c89d5640ae884ef7984b9c30.tar.xz
mdadm-583315d9c522c310c89d5640ae884ef7984b9c30.zip
Give useful message if raid4/5/6 cannot be started because it is not clean and is also degraded.
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 140f637..1890949 100644
--- a/super1.c
+++ b/super1.c
@@ -429,6 +429,7 @@ static void getinfo_super1(struct mdinfo *info, void *sbv)
info->array.ctime = __le64_to_cpu(sb->ctime);
info->array.utime = __le64_to_cpu(sb->utime);
info->array.chunk_size = __le32_to_cpu(sb->chunksize)*512;
+ info->array.state = (__le64_to_cpu(sb->resync_offset)+1) ? 0 : 1;
info->data_offset = __le64_to_cpu(sb->data_offset);
info->component_size = __le64_to_cpu(sb->size);