Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946518AbWKAFlk (ORCPT ); Wed, 1 Nov 2006 00:41:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946512AbWKAFk7 (ORCPT ); Wed, 1 Nov 2006 00:40:59 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:658 "EHLO sous-sol.org") by vger.kernel.org with ESMTP id S1946523AbWKAFkN (ORCPT ); Wed, 1 Nov 2006 00:40:13 -0500 Message-Id: <20061101054018.139620000@sous-sol.org> References: <20061101053340.305569000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Tue, 31 Oct 2006 21:34:09 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org, Andrew Morton Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, alan@lxorguk.ukuu.org.uk, NeilBrown , linux-raid@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH 29/61] md: Fix calculation of ->degraded for multipath and raid10 Content-Disposition: inline; filename=md-fix-calculation-of-degraded-for-multipath-and-raid10.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 46 -stable review patch. If anyone has any objections, please let us know. ------------------ From: NeilBrown Two less-used md personalities have bugs in the calculation of ->degraded (the extent to which the array is degraded). Signed-off-by: Neil Brown Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- drivers/md/multipath.c | 2 +- drivers/md/raid10.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- linux-2.6.18.1.orig/drivers/md/multipath.c +++ linux-2.6.18.1/drivers/md/multipath.c @@ -480,7 +480,7 @@ static int multipath_run (mddev_t *mddev mdname(mddev)); goto out_free_conf; } - mddev->degraded = conf->raid_disks = conf->working_disks; + mddev->degraded = conf->raid_disks - conf->working_disks; conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, sizeof(struct multipath_bh)); --- linux-2.6.18.1.orig/drivers/md/raid10.c +++ linux-2.6.18.1/drivers/md/raid10.c @@ -2042,7 +2042,7 @@ static int run(mddev_t *mddev) disk = conf->mirrors + i; if (!disk->rdev || - !test_bit(In_sync, &rdev->flags)) { + !test_bit(In_sync, &disk->rdev->flags)) { disk->head_position = 0; mddev->degraded++; } -- - 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/