]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super1.c
getinfo_super1: Use MaxSector in place of sb->size
authorAlexander Lyakas <alex.bolshoy@gmail.com>
Mon, 6 Feb 2012 23:15:20 +0000 (10:15 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 6 Feb 2012 23:15:20 +0000 (10:15 +1100)
commitd59770567cc6078f555663cbc1929ddffdcc2f2e
tree311e49b20d1f49e969fda2fe2af8651ee432e539
parentf878b24226953f06912ebceb2c811edf36818d2f
getinfo_super1: Use MaxSector in place of sb->size

when deciding whether the array is clean or dirty, compare
sb->resync_offset against MaxSector and not against sb->size

With RAID6 resyncing and subsequent drive failures, it is possible to
reach the case, in which sb->resync_offset==sb->size. This happens
when resync is aborted due to drive failures, and immediately a
rebuild of a spare starts. In this case, mdadm was considered the
array as clean, while kernel was considering the array as dirty. It is
better for mdadm also to consider the array as dirty in this case.

Signed-off-by: NeilBrown <neilb@suse.de>
super1.c