From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932280AbXCBE6D (ORCPT ); Thu, 1 Mar 2007 23:58:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932643AbXCBE6B (ORCPT ); Thu, 1 Mar 2007 23:58:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:60639 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932280AbXCBE6A (ORCPT ); Thu, 1 Mar 2007 23:58:00 -0500 From: NeilBrown To: Andrew Morton Date: Fri, 2 Mar 2007 15:56:55 +1100 Message-Id: <1070302045655.19069@suse.de> X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org ### Comments for Changeset Recent patch for raid6 reshape had a change missing that showed up in subsequent review. Many places in the raid5 code used "conf->raid_disks-1" to mean "number of data disks". With raid6 that had to be changed to "conf->raid_disk - conf->max_degraded" or similar. One place was missed. This bug means that if a raid6 reshape were aborted in the middle the recorded position would be wrong. On restart it would either fail (as the position wasn't on an appropriate boundary) or would leave a section of the array unreshaped, causing data corruption. Signed-off-by: Neil Brown ### Diffstat output ./drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c --- .prev/drivers/md/raid5.c 2007-03-02 15:47:51.000000000 +1100 +++ ./drivers/md/raid5.c 2007-03-02 15:48:35.000000000 +1100 @@ -3071,7 +3071,7 @@ static sector_t reshape_request(mddev_t release_stripe(sh); } spin_lock_irq(&conf->device_lock); - conf->expand_progress = (sector_nr + i)*(conf->raid_disks-1); + conf->expand_progress = (sector_nr + i) * new_data_disks); spin_unlock_irq(&conf->device_lock); /* Ok, those stripe are ready. We can start scheduling * reads on the source stripes.