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

Re: sparse loop devices and ext3



Stephen writes:
> On Fri, Feb 09, 2001 at 06:55:15PM -0800, Peter J. Braam wrote:
> > It has a function create_missing_block, that calls f_write. So it should
> > allocate within an ext3 transaction.  So where is all this corruption
> > coming from: probably the fix to 5e you sent in a few days ago.
> 
> The 0.0.5e bug might mean that the data flush is not synchronised to
> the metadata flush if you are using ordered data mode.  However, loop
> device writes using bmap are *never* journaled, and the metadata
> updates from the write() allocation will still be journaled.
> 
> What exactly is the desired behaviour?  For loop writes to be
> data-journaled?  That will require changes to the loop device to
> prevent it from ever using bmap().

I think the problem is that if you are loopback mounting a file, the ext3
code itself doesn't consider the loopback file contents as "metadata" for
the underlying file, so it is not journaled, even though it is metadata
in the loopback filesystem.

Peter, I think there are several workarounds for this - don't make sparse
backing files, or mark the backing file as "data=journal", or don't use
loopback files.  I'm not sure what you are working on, so I can't say
what is best in this case.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





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