Commit:     1031be7a5fafd3a858dfaabb74d98f9ca20744a8
Parent:     3eda22d19b76b15ef3420b251bd47a0ba0127589
Author:     NeilBrown <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 26 00:57:02 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jan 26 13:50:59 2007 -0800

    [PATCH] md: make sure the events count in an md array never returns to zero
    Now that we sometimes step the array events count backwards (when
    transitioning dirty->clean where nothing else interesting has happened - so
    that we don't need to write to spares all the time), it is possible for the
    event count to return to zero, which is potentially confusing and triggers 
    We could possibly remove the MD_BUG, but is just as easy, and probably 
    to make sure we never return to zero.
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/md/md.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index d1cb45f..ec3d8e8 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1633,7 +1633,8 @@ repeat:
         * and 'events' is odd, we can roll back to the previous clean state */
        if (nospares
            && (mddev->in_sync && mddev->recovery_cp == MaxSector)
-           && (mddev->events & 1))
+           && (mddev->events & 1)
+           && mddev->events != 1)
        else {
                /* otherwise we have to go forward and ... */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to