From: Andreas Dilger <adilger@turbolabs.com>
To: Marc SCHAEFER <schaefer@alphanet.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ext2 not NULLing deleted files?
Date: Fri, 17 Aug 2001 11:25:25 -0600 [thread overview]
Message-ID: <20010817112525.A17372@turbolinux.com> (raw)
In-Reply-To: <01081709381000.08800@haneman> <200108171632.SAA00941@vulcan.alphanet.ch>
In-Reply-To: <200108171632.SAA00941@vulcan.alphanet.ch>
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?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-08-17 17:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-17 7:38 ext2 not NULLing deleted files? Enver Haase
2001-08-17 7:47 ` Robert Love
2001-08-17 17:40 ` Mark H. Wood
2001-08-17 7:56 ` Thomas Pornin
2001-08-17 8:02 ` Andreas Dilger
2001-08-17 17:55 ` Mark H. Wood
2001-08-17 20:09 ` Andreas Dilger
2001-08-21 14:19 ` Andreas Bombe
2001-08-17 16:32 ` Marc SCHAEFER
2001-08-17 17:25 ` Andreas Dilger [this message]
[not found] <01081709381000.08800@haneman.suse.lists.linux.kernel>
2001-08-17 8:03 ` Andi Kleen
2001-08-17 14:20 ` Kent Borg
-- strict thread matches above, loose matches on Subject: below --
2001-08-17 22:05 Jesse Pollard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010817112525.A17372@turbolinux.com \
--to=adilger@turbolabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schaefer@alphanet.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox