Neil Brown wrote:
On Friday September 10, paul.clements@steeleye.com wrote:
quoted
Neil,
unless you've already done so, I believe there is a little fix needed in
the raid1 read reschedule code. As the code currently works, a read that
is retried will continue to fail and cause raid1 to go into an infinite
retry loop:
Thanks. I must have noticed this when writing the raid10 module
because it gets it right. Obviously I didn't "back-port" it to raid1.
A few other fields need to be reset for safety.
Well, it turns out that even that is not enough. Even with your patch,
we're still seeing ext3-fs errors, which means we're getting bogus data
on the read retry (the filesystem is re-created every test run, so
there's no chance of lingering filesystem corruption causing the errors).
Rather than getting down in the guts of the bio and trying to reset all
the fields that potentially could have been touched, I think it's
probably safer to simply discard the bio that had the failed I/O
attempted against it and clone a new bio, setting it up just as we did
for the original read attempt. This seems to work better and will also
protect us against any future changes in the bio code (or bio handling
in any driver sitting below raid1), which could break read retry again.
Patch attached.
--
Paul