linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* md: raid5 resync corrects read errors on data block - is this correct?
@ 2012-09-11 19:10 Alexander Lyakas
  2012-09-11 22:29 ` NeilBrown
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Lyakas @ 2012-09-11 19:10 UTC (permalink / raw)
  To: linux-raid

Hi Neil,
I have been doing some investigation about resync on raid5, and I
induced a repairable read error on a drive that contains a data block
for a particular stripe_head. I saw that resync corrects the read
error by recomputing the missing data block, rewriting it (twice) and
then re-reading back.

Then I dug into code and eventually saw that fetch_block():

if ((s->uptodate == disks - 1) &&
    (s->failed && (disk_idx == s->failed_num[0] ||
		   disk_idx == s->failed_num[1]))) {
	/* have disk failed, and we're requested to fetch it;
	 * do compute it
	 */

doesn't care whether disk_idx holds data or parity for this
stripe_head. It only checks that stripe_head has enough redundancy to
recompute the block.

My question: is this behavior correct? I mean that if we are doing
resync, it means that we are not sure that parity is correct (e.g.,
after an unclean shutdown). But we still use this possibly-incorrect
parity to recompute the missing data block. So is this a potential
bug?

Thanks,
Alex.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-09-25  7:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 19:10 md: raid5 resync corrects read errors on data block - is this correct? Alexander Lyakas
2012-09-11 22:29 ` NeilBrown
2012-09-12  7:15   ` Alexander Lyakas
2012-09-12 16:49   ` Alexander Lyakas
2012-09-13  0:19     ` NeilBrown
2012-09-13 16:05       ` Alexander Lyakas
2012-09-13 16:11         ` Alexander Lyakas
2012-09-17 11:15           ` Alexander Lyakas
2012-09-19  5:59             ` NeilBrown
2012-09-20  8:26               ` Alexander Lyakas
2012-09-25  6:57                 ` NeilBrown
2012-09-25  7:50                   ` Alexander Lyakas

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).