From: NeilBrown <neilb@suse.de>
To: Namhyung Kim <namhyung@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 3/3] md/raid10: move rdev->corrected_errors counting
Date: Thu, 14 Jul 2011 15:54:57 +1000 [thread overview]
Message-ID: <20110714155457.3fd45623@notabene.brown> (raw)
In-Reply-To: <1309279646-4950-4-git-send-email-namhyung@gmail.com>
On Wed, 29 Jun 2011 01:47:26 +0900 Namhyung Kim <namhyung@gmail.com> wrote:
> Read errors are considered to corrected if write-back and re-read
> cycle is finished without further problems. Thus moving the rdev->
> corrected_errors counting after the re-reading looks more reasonable
> IMHO.
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> For end_sync_read(), I'm not sure what should I do. But I think, at
> least, the counting should be moved to end_sync_write() and that
> might require additional field(s) in r10_bio. So I leave it as is
> for simplicity now. How do you think?
I don't think it really matters.
If the read error doesn't get corrected, then the device will be failed
and the 'corrected_errors' count won't mean anything any more...
Maybe we should just change the field to 'read_errors' and adjust it whenever
we get a read error. If the device is still in the array, then the error
must have been corrected, if not, it count will be ignored.
There is a corner case where we don't evict the last mirror from an array due
to a read error - we would need to handle that some how.
But otherwise I don't think this is an issue.
I have applied all three patches because they do make the code a bit cleaner
and clear, but I don't think we really need to worry further about RAID10.
Thanks,
NeilBrown
>
> drivers/md/raid10.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 8628a62a02f0..0660bc9597d8 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -1524,7 +1524,6 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
> test_bit(In_sync, &rdev->flags)) {
> atomic_inc(&rdev->nr_pending);
> rcu_read_unlock();
> - atomic_add(s, &rdev->corrected_errors);
> if (sync_page_io(rdev,
> r10_bio->devs[sl].addr +
> sect,
> @@ -1589,6 +1588,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
> (unsigned long long)(
> sect + rdev->data_offset),
> bdevname(rdev->bdev, b));
> + atomic_add(s, &rdev->corrected_errors);
> }
>
> rdev_dec_pending(rdev, mddev);
prev parent reply other threads:[~2011-07-14 5:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 16:47 [PATCH 0/3] count rdev->corrected_errors after final re-read Namhyung Kim
2011-06-28 16:47 ` [PATCH 1/3] md/raid1: move rdev->corrected_errors counting Namhyung Kim
2011-06-28 16:47 ` [PATCH 2/3] md/raid5: " Namhyung Kim
2011-06-28 16:47 ` [PATCH 3/3] md/raid10: " Namhyung Kim
2011-07-14 5:54 ` NeilBrown [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=20110714155457.3fd45623@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=namhyung@gmail.com \
/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).