Wrapped journal record corruption on read at recovery - patch attached (was Re: XFS corruption with failover)

Christoph Hellwig hch at infradead.org
Fri Oct 16 01:00:17 CDT 2009


On Thu, Oct 15, 2009 at 07:36:33PM -0500, Andy Poling wrote:
> Looking at the improved code since 2.6.29, and assuming that the beginning of
> the log will always be aligned, I have come up with the attached patch against
> 2.6.31.4.  I think it's cleaner, and it passes my tests.
>
> The bufaddr variable is no longer needed.  I removed the xlog_align() after
> the second read for both headers and data since the second read will always be
> aligned (even if there was no first read) since it is always at the beginning
> of the log.
>
> It sets offset to the beginning of the buffer with XFS_BUF_PTR() before the
> first read, and then your improved xlog_bread() will update the offset if the
> first read had to be re-aligned.
>
> What do you think?

The patch looks good to me from a quick glance.  I still need to read
through the code in that area a bit more, and I really want to write a QA
testcase to reproduce it.




More information about the xfs mailing list