diff options
author | Neil Brown <neilb@suse.de> | 2006-12-14 17:32:59 +1100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-12-14 17:32:59 +1100 |
commit | 4855f95c7081d7438b55fed8f8808cc656f0ccc0 (patch) | |
tree | 439dcdac833780dbb5e8d23b4ae74588ae7a1e87 /super1.c | |
parent | beae1dfe2e5a3f11e6e52a93fbf617d644708415 (diff) | |
download | mdadm-4855f95c7081d7438b55fed8f8808cc656f0ccc0.tar.gz mdadm-4855f95c7081d7438b55fed8f8808cc656f0ccc0.tar.xz mdadm-4855f95c7081d7438b55fed8f8808cc656f0ccc0.zip |
Fix bug where v1 superblock might appear active when they should be clean.
Only happens on kernel with 32 bit sector_t.
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -431,7 +431,9 @@ 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->array.state = + (__le64_to_cpu(sb->resync_offset) >= __le64_to_cpu(sb->size)) + ? 1 : 0; info->data_offset = __le64_to_cpu(sb->data_offset); info->component_size = __le64_to_cpu(sb->size); |