[lkml]   [2001]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ext2 not NULLing deleted files?
On Aug 17, 2001  18:32 +0200, Marc SCHAEFER wrote:
> Special care, as far as I understand it, must be taken when allocating
> fs data blocks. The following sequence must be followed:
> 1. reserve them
> 2. clear them
> 3. mark them as allocated.
> if 2 is too expensive, maybe it's sufficient to mark them as dirty
> and zero them in memory. But what happens if the system crashes, with
> the metadata to the disk (block allocated), but the data block not
> yet filled/zeroed ?

Ext2 and ext3 both do this already (with caveats). Since ext2 doesn't
impose write ordering constraints, there is not a hard guarantee that
the data block makes it to disk before the metadata is updated. If
you run ext3 in data=ordered or data=journal mode, then you do have
such a guarantee.

If you run in data=writeback mode, you basically have the same
situation as ext2 (data may be written before or after the metadata).
This is the same as the _current_ reiserfs code, but there are
apparently patches available which allow data=ordered mode also.

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?" -- Dogbert

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:17    [W:0.093 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site