Re: [PATCH] fix barrier fail detection

Dave Chinner
2008-10-09T22:34:00Z

On Thu, Oct 09, 2008 at 03:00:42PM +0200, Christoph Hellwig wrote:
> Currently we disable barriers as soon as we get a buffer in xlog_iodone
> that has the XBF_ORDERED flag cleared. But this can be the case not only
> for buffers where the barrier failed, but also the first buffer of a
> split log write in case of a log wraparound. Due to the disabled
> barriers we can easily get directory corruption on unclean shutdowns.
> So instead of using this check add a new buffer flag for failed barrier
> writes.
>
> This is a regression vs 2.6.26 caused by patch to use the right macro
> to check for the ORDERED flag, as we previously got true returned for
> every buffer.
>
> Thanks to Toei Rei for reporting the bug.

Looks good. Should this be sent straight to Linus to get it into
.27? If you want to do that, you can add my SOB.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com