[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#569598: disk caches?



On Tue, Feb 16, 2010 at 10:58:06AM -0500, Philipp Weis wrote:
> On 2010-02-16 11:21, Christoph Hellwig <hch@lst.de> wrote:
> > Do you have disk write caches disabled on the machine?  Neither md, nor
> > dm, nor loop pass through barrier requests.  Without disabling the
> > volatile write cache on the disks you will lose data everytime the
> > machine is not shut down cleanly.  The messages you see are typical
> > for that kind of corruption.
> 
> The caches are all off.

Hmm, it really does look like the typical write cache corruption.

Looking a bit at the loop driver as suspsect I think I know what the
problem is:

 - loop writes data either using the address_space operations, or
   using ->write, but it never calls does the O_SYNC processing
   (just ->fsync in modern kernels, but a little different in 2.6.26)

So when using loop data simply gets written into the page cache, but
there is no guarantee it ever goes out to disk.

This bug is still present in latests upstream - a patch to introduce
barrier support calling ->fsync went in a while ago but caused
mysterious lockups and was reverted, with the patch author never
coming back to try to figure it out.




Reply to: