On Fri, May 9, 2008 at 2:01 AM, Neil Brown <neilb@suse.de> wrote:
Yes, it is repeatable with your previous patch. But with your most
recent patch I had the following after shutdown:
# mdadm -X /dev/nbd0 /dev/sdq
Filename : /dev/nbd0
Events : 1732
Events Cleared : 1732
Bitmap : 409600 bits (chunks), 1 dirty (0.0%)
Filename : /dev/sdq
Events : 1736
Events Cleared : 1736
Bitmap : 409600 bits (chunks), 1 dirty (0.0%)
Unfortunately sdq's events_cleared appears to have been updated
_after_ the array became degraded.
As such a full resync occurred because 1732 < 1736.
Comments inlined below.
Before, events_cleared was _not_ updated if the array was degraded.
Your patch doesn't appear to maintain that design.
I tried adding the following degraded check to your below conditional
but that resulted in nbd0's events < mddev->bitmap->events_cleared
again, so I'm back to square one:
if (!bitmap->mddev->degraded &&
bitmap->events_cleared < bitmap->mddev->events) {
In addition no bits were set in sdq's bitmap:
# mdadm -X /dev/nbd0 /dev/sdq
Filename : /dev/nbd0
Events : 2616
Events Cleared : 2617
Bitmap : 409600 bits (chunks), 0 dirty (0.0%)
Filename : /dev/sdq
Events : 2618
Events Cleared : 2617
Bitmap : 409600 bits (chunks), 0 dirty (0.0%)
I needed "bitmap->mddev->sb_wait" and "bitmap->mddev->flags" to get
the code to compile.
Mike
--