This is a note to let you know that I've just added the patch titled

    md: test mddev->flags more safely in md_check_recovery.

to the 3.12-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     md-test-mddev-flags-more-safely-in-md_check_recovery.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 142d44c310819e1965ca70b4d55d7679f5797e25 Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Thu, 28 Nov 2013 10:34:18 +1100
Subject: md: test mddev->flags more safely in md_check_recovery.

From: NeilBrown <[email protected]>

commit 142d44c310819e1965ca70b4d55d7679f5797e25 upstream.

commit 7a0a5355cbc71efa md: Don't test all of mddev->flags at once.
made most tests on mddev->flags safer, but missed one.

When
commit 260fa034ef7a4ff8b7306 md: avoid deadlock when dirty buffers during 
md_stop.
added MD_STILL_CLOSED, this caused md_check_recovery to misbehave.
It can think there is something to do but find nothing.  This can
lead to the md thread spinning during array shutdown.

https://bugzilla.kernel.org/show_bug.cgi?id=65721

Reported-and-tested-by: Richard W.M. Jones <[email protected]>
Fixes: 260fa034ef7a4ff8b7306
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/md/md.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7792,7 +7792,7 @@ void md_check_recovery(struct mddev *mdd
        if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
                return;
        if ( ! (
-               (mddev->flags & ~ (1<<MD_CHANGE_PENDING)) ||
+               (mddev->flags & MD_UPDATE_SB_FLAGS & ~ (1<<MD_CHANGE_PENDING)) 
||
                test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) ||
                test_bit(MD_RECOVERY_DONE, &mddev->recovery) ||
                (mddev->external == 0 && mddev->safemode == 1) ||


Patches currently in stable-queue which might be from [email protected] are

queue-3.12/md-raid5-before-freeing-old-multi-thread-worker-it-should-flush-them.patch
queue-3.12/md-fix-calculation-of-stacking-limits-on-level-change.patch
queue-3.12/raid5-use-slow_path-to-release-stripe-when-mddev-thread-is-null.patch
queue-3.12/md-test-mddev-flags-more-safely-in-md_check_recovery.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to