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

    md/raid10: decrement correct pending counter when writing to replacement.

to the 3.6-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-raid10-decrement-correct-pending-counter-when-writing-to-replacement.patch
and it can be found in the queue-3.6 subdirectory.

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


>From 884162df2aadd7414bef4935e1a54976fd4e3988 Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Thu, 22 Nov 2012 15:12:09 +1100
Subject: md/raid10: decrement correct pending counter when writing to 
replacement.

From: NeilBrown <[email protected]>

commit 884162df2aadd7414bef4935e1a54976fd4e3988 upstream.

When a write to a replacement device completes, we carefully
and correctly found the rdev that the write actually went to
and the blithely called rdev_dec_pending on the primary rdev,
even if this write was to the replacement.

This means that any writes to an array while a replacement
was ongoing would cause the nr_pending count for the primary
device to go negative, so it could never be removed.

This bug has been present since replacement was introduced in
3.3, so it is suitable for any -stable kernel since then.

Reported-by: "George Spelvin" <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

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

--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -499,7 +499,7 @@ static void raid10_end_write_request(str
         */
        one_write_done(r10_bio);
        if (dec_rdev)
-               rdev_dec_pending(conf->mirrors[dev].rdev, conf->mddev);
+               rdev_dec_pending(rdev, conf->mddev);
 }
 
 /*


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

queue-3.6/md-raid10-decrement-correct-pending-counter-when-writing-to-replacement.patch
queue-3.6/md-reassigned-the-parameters-if-read_seqretry-returned-true-in-func-md_is_badblock.patch
queue-3.6/md-avoid-write-invalid-address-if-read_seqretry-returned-true.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