Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946279AbXBCCmA (ORCPT ); Fri, 2 Feb 2007 21:42:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946276AbXBCCju (ORCPT ); Fri, 2 Feb 2007 21:39:50 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:53264 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946267AbXBCCja (ORCPT ); Fri, 2 Feb 2007 21:39:30 -0500 Message-Id: <20070203024348.243162000@sous-sol.org> References: <20070203023504.435051000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Fri, 02 Feb 2007 18:35:43 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, NeilBrown Subject: [patch 39/59] md: make repair actually work for raid1. Content-Disposition: inline; filename=md-make-repair-actually-work-for-raid1.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 37 -stable review patch. If anyone has any objections, please let us know. ------------------ From: NeilBrown When 'repair' finds a block that is different one the various parts of the mirror. it is meant to write a chosen good version to the others. However it currently writes out the original data to each. The memcpy to make all the data the same is missing. Signed-off-by: Neil Brown Signed-off-by: Chris Wright --- drivers/md/raid1.c | 5 +++++ 1 file changed, 5 insertions(+) --- linux-2.6.19.2.orig/drivers/md/raid1.c +++ linux-2.6.19.2/drivers/md/raid1.c @@ -1266,6 +1266,11 @@ static void sync_request_write(mddev_t * sbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset; sbio->bi_bdev = conf->mirrors[i].rdev->bdev; + for (j = 0; j < vcnt ; j++) + memcpy(page_address(sbio->bi_io_vec[j].bv_page), + page_address(pbio->bi_io_vec[j].bv_page), + PAGE_SIZE); + } } } -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/