From: "majianpeng" <majianpeng@gmail.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: question about:raid1 fix_read_error
Date: Wed, 11 Apr 2012 13:09:01 +0800 [thread overview]
Message-ID: <201204111308528593924@gmail.com> (raw)
Hi,Neil
I readed the code of raid1:fix_read_error().I find some problem:
1:In order to find other correct data, your code only judge :
rdev &&
test_bit(In_sync, &rdev->flags) &&
is_badblock(rdev, sect, s,
&first_bad, &bad_sectors) == 0 &&
sync_page_io(rdev, sect, s<<9,
conf->tmppage, READ, false))
But the spare disk which is woring ? you can use spare disk is read_balance().
If you can using spare disk why you set bad blocks?
2: about set bad blocks,when did not find correct data.
You only:
struct md_rdev *rdev = conf->mirrors[read_disk].rdev;
if (!rdev_set_badblocks(rdev, sect, s, 0))
md_error(mddev, rdev);
But the other disks which you try to find.
If you did not set all disks,then in read_balance will read other disk which call in fix_read_error.But the result is the same,
read error and set badsectors.
--------------
majianpeng
2012-04-11
reply other threads:[~2012-04-11 5:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201204111308528593924@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 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).