From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrei Warkentin Subject: Re: [PATCH] MD: Allow restarting an interrupted incremental recovery. Date: Tue, 18 Oct 2011 13:06:05 -0700 (PDT) Message-ID: <339397930.59570.1318968365639.JavaMail.root@zimbra-prod-mbox-2.vmware.com> References: <486504952.50696.1318957644567.JavaMail.root@zimbra-prod-mbox-2.vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <486504952.50696.1318957644567.JavaMail.root@zimbra-prod-mbox-2.vmware.com> Sender: linux-raid-owner@vger.kernel.org To: NeilBrown Cc: linux-raid@vger.kernel.org, Andrei Warkentin List-Id: linux-raid.ids Hi Neil, ----- Original Message ----- > From: "Andrei Warkentin" > To: "NeilBrown" > Cc: linux-raid@vger.kernel.org, "Andrei Warkentin" > Sent: Tuesday, October 18, 2011 1:07:24 PM > Subject: Re: [PATCH] MD: Allow restarting an interrupted incremental recovery. > > > Also I realised that clearing saved_raid_disk when an array is not > > degraded > > is no longer enough. We also need to clear it when the device > > becomes > > In_sync. > > Consider a 3-drive RAID1 with two drives missing. You add back one > > of them > > and when it is recovered it needs saved_raid_disk cleared so that > > the > > superblock gets written out. > > > > So below is what I applied. > > > > Wouldn't all drives being In_sync imply the array is not degraded - > i.e. can the > check for a degraded array be omitted then, at all? I.e. if after the > resync the > In_sync bit is set - drop saved_raid_role. > Come to think of it - checking for !mddev->degraded might not be a good idea at all. After all, you could imagine a situation where in a RAID1 array with A and B, A is recovered from B and then B goes away before the SBs are flushed due to resync finishing - you would still want A's SB to be flushed, even if array is degraded. Otherwise you'll end up with another incremental rebuilding A, and lost/inconsistent data after array became degraded (since it was going to A, but we never wrote out its SB, since array is degraded). What do you think? A