[PATCH] Re: Find mismatch in data blocks during raid6 repair
flat view
STALE5198d
From: Robert Buchholz <hidden>
Date: 2012-07-20 10:40:04
Hello, On Monday, July 09, 2012 01:43:08 PM NeilBrown wrote:
On Tue, 3 Jul 2012 22:27:34 +0200 Piergiorgio Sartor [off-list ref] wrote:quoted
On Tue, Jul 03, 2012 at 09:10:41PM +0200, Robert Buchholz wrote:quoted
quoted
Why always two blocks?The reason is simply to have less cases to handle in the code. There's already three ways to regenerate regenerate two blocks (D&D, D/P&Q and D&P), and there would be two more cases if only one block was to be repaired. With the original patch, if you can repair two blocks, that allows you to repair one (and one other in addition) as well.>sorry, I express myself not clearly. I mean, a two parities Reed-Solomon system can only detect one incorrect slot position, so I would expect to have the possibility to fix only one, not two slots. So, I did not understand why two. I mean, I understand that a RAID-6 can correct exact up two incorrect slots, but the "unknown" case might have more and correcting will mean no correction or, maybe, even more damage. I would prefer, if you agree, to simply tell "raid6check" to fix a single slot, or the (single) wrong slots it finds during the check.I think this is a sensible feature to offer. Maybe if "autorepair" is given in place of "repair", then it should choose which block to repair, and do that one?
That makes sense, I wanted to make it work and get some feedback first. I'll look into this.
I have applied the patches, though with some fairly minor editing (wrapping lines, moving variable declarations before any statements, removing tab-at-the-end-of-the-line). They probably won't appear in my public .git for a little while I I have some other patches that I need to sort through and organise first.
Thank you for merging and the cleanup. I have attached three patches against your latest HEAD. The first fixes compilation of the raid6check tool after the xmalloc refactoring. The other two are bugfixes in the repair code. The latter bug is somewhat embarrassing, I used geo_map in the wrong direction, yielding incorrect data block indices to repair. This will lead to a data corruption on the stripe in most cases (interestingly, not in my test case due to the way the raid size and stripe index were chosen). Cheers, Robert
Attachments
- signature.asc [application/pgp-signature] 836 bytes