lkml.org 
[lkml]   [2010]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 063/164] md/raid1: fix counting of write targets.
    2.6.33-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: NeilBrown <neilb@suse.de>

    commit 964147d5c86d63be79b442c30f3783d49860c078 upstream.

    There is a very small race window when writing to a
    RAID1 such that if a device is marked faulty at exactly the wrong
    time, the write-in-progress will not be sent to the device,
    but the bitmap (if present) will be updated to say that
    the write was sent.

    Then if the device turned out to still be usable as was re-added
    to the array, the bitmap-based-resync would skip resyncing that
    block, possibly leading to corruption. This would only be a problem
    if no further writes were issued to that area of the device (i.e.
    that bitmap chunk).

    Suitable for any pending -stable kernel.

    Signed-off-by: NeilBrown <neilb@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/md/raid1.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/drivers/md/raid1.c
    +++ b/drivers/md/raid1.c
    @@ -911,9 +911,10 @@ static int make_request(struct request_q
    if (test_bit(Faulty, &rdev->flags)) {
    rdev_dec_pending(rdev, mddev);
    r1_bio->bios[i] = NULL;
    - } else
    + } else {
    r1_bio->bios[i] = bio;
    - targets++;
    + targets++;
    + }
    } else
    r1_bio->bios[i] = NULL;
    }



    \
     
     \ /
      Last update: 2010-07-01 23:07    [W:3.439 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site