From: "majianpeng" <majianpeng@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Re: about:conf->recovery_disabled and mddev->recovery_disabled
Date: Tue, 10 Apr 2012 13:37:26 +0800 [thread overview]
Message-ID: <201204101337227186158@gmail.com> (raw)
In-Reply-To: 201204071713172658588@gmail.com
I readed the raid1:error(),I can't understand this code:
/*
* If it is not operational, then we have already marked it as dead
* else if it is the last working disks, ignore the error, let the
* next level up know.
* else mark the drive as failed
*/
if (test_bit(In_sync, &rdev->flags)
&& (conf->raid_disks - mddev->degraded) == 1) {
/*
* Don't fail the drive, act as though we were just a
* normal single drive.
* However don't try a recovery from this drive as
* it is very likely to fail.
*/
conf->recovery_disabled = mddev->recovery_disabled;
return;
}
question 1:
If error occur and the raid1 is recoveying,but the error did not occur because recovery operation.The recovery will continue.
question 2:
when error occur,The disk may have to many error.so the code is :
conf->recovery_disabled = mddev->recovery_disabled;
But I can add a spare disk and recovery.
Is it correctly?
Thanks!
------------------
majianpeng
2012-04-10
-------------------------------------------------------------
发件人:NeilBrown
发送日期:2012-04-09 08:03:38
收件人:majianpeng
抄送:linux-raid
主题:Re: about:conf->recovery_disabled and mddev->recovery_disabled
On Sat, 7 Apr 2012 17:13:22 +0800 "majianpeng" <majianpeng@gmail.com> wrote:
> Hi all:
> I confused the recovery_disabled.
> what's the mean when conf->recovery_disabled = mddev->recovery_disabled?
> If equal,so not to add disk and not to recovery?
Yes, exactly.
in an attempt to recover a device fails we don't want to immediately retry as
that would cause a loop.
So whenever a recovery fails, we set conf->recovery_disabled to match
mddev->recovery_disable. And whenever something changes which might make
recovery possible, we increment mddev->recovery_disabled, so that it tries
again.
With raid10, the 'recovery_disabled' is per-disk, not per-array.
NeilBrown
prev parent reply other threads:[~2012-04-10 5:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-07 9:13 about:conf->recovery_disabled and mddev->recovery_disabled majianpeng
2012-04-09 0:03 ` NeilBrown
2012-04-10 5:37 ` majianpeng [this message]
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=201204101337227186158@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.