From: NeilBrown <neilb@suse.de>
To: Andrei Warkentin <awarkentin@vmware.com>
Cc: Andrei Warkentin <andreiw@vmware.com>,
linux-raid@vger.kernel.org,
"Andrei E. Warkentin" <andrey.warkentin@gmail.com>
Subject: Re: [RFC] MD: Allow restarting an interrupted incremental recovery.
Date: Tue, 18 Oct 2011 07:58:54 +1100 [thread overview]
Message-ID: <20111018075854.7f026e2a@notabene.brown> (raw)
In-Reply-To: <992889476.11312.1318872404724.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]
On Mon, 17 Oct 2011 10:26:44 -0700 (PDT) Andrei Warkentin
<awarkentin@vmware.com> wrote:
> Hi Neil,
> > If you look at it that way, you might notice that saved_raid_disk is
> > also set
> > in slot_store, so probably InIncremental should be set there. So
> > that might
> > be the one thing you missed.
> >
>
> Actually, maybe you can clarify something a bit about that code? The part where
> slot != -1 and mddev->pers != NULL looks a lot like the add_new_disk path - except:
>
> After pers->hot_add_disk:
> 1) rdev In_sync isn't cleared
That looks like a bug. I don't think I've ever tested re-adding a device by
setting 'slot' - only adding. And for adding, In_sync is already clear.
Thanks for spotting that.
> 2) Array isn't checked for degraded state and MD_RECOVERY_RECOVER isn't conditionally set.
I think that isn't really needed in add_new_disk.
md_check_recovery will set it before recovery starts if there are spares in
the array.
So I'm inclined to just remove it from add_new_disk, but I feel that I need
to read the code a bit more carefully first.
In any case, the next point makes the omission harmless even if
MD_RECOVERY_RECOVER is needed there for some reason.
> 3) MD_RECOVERY_NEEDED isn't set.
That might be deliberate. It allows a few drives to be added, then recovery
started by writing "recover" to sync_action.
The same could be achieved by writing "frozen" to sync_action first but I
probably wrote this code before I added "frozen".
> 4) mddev->thread is't woken up.
That goes with 3. we only wake up the thread so that it notices
MD_RECOVERY_NEEDED.
>
> Is this because if an array was degraded AND there were extra spares, they would already be
> assigned to the array?
Probably, yes.
Thinking a bit more, you would only get to set 'slot' on a spare in an active
array if you had first 'frozen' sync_action .. so some of my comments above
might be a bit wrong.
And given that you have frozen sync_action, you really don't want to set
MD_RECOVERY_NEEDED or start the thread.
Thanks,
NeilBrown
>
> > Could you respin the patch without adding InIncremental, and testing
> > rdev->saved_raid_disk >= 0
> > instead, check if you agree that should work, and perform a similar
> > test?
> > (Is that asking too much?).
> >
>
> Absolutely! Thanks again!
>
> A
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2011-10-17 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 19:41 [RFC] MD: Restart an interrupted incremental recovery Andrei Warkentin
2011-10-12 23:04 ` Andrei E. Warkentin
2011-10-12 23:05 ` [RFC] MD: Allow restarting " Andrei Warkentin
2011-10-14 1:18 ` Andrei E. Warkentin
2011-10-17 3:20 ` NeilBrown
2011-10-17 17:26 ` Andrei Warkentin
2011-10-17 20:58 ` NeilBrown [this message]
2011-10-14 1:07 ` [RFC] MD: Restart " Andrei E. Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111018075854.7f026e2a@notabene.brown \
--to=neilb@suse.de \
--cc=andreiw@vmware.com \
--cc=andrey.warkentin@gmail.com \
--cc=awarkentin@vmware.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).