mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petter Larsen <pla@morecom.no>
To: Phil White <ext3@philwhite.org>
Cc: ext3 <ext3-users@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: mode data=journal in ext3. Is it safe to use?
Date: Thu, 17 Jun 2004 13:23:32 +0200	[thread overview]
Message-ID: <1087471412.2765.209.camel@pla.lokal.lan> (raw)
In-Reply-To: <1805.216.148.213.196.1087426691.squirrel@www.code-visions.com>


> I was never able to resolve the problems I had with data=journal with the
> 2.4 kernel.  I did *not* try the 2.6 kernel though, so I can't give you
> any data points there.  In the end, I settled for data=ordered, and have
> never seen the problems I described in my original posts.  Also, to give
> you some background, I had been using ReiserFS before switching to ext3,
> and I experienced a lot of corruption with Reiser (my company makes linux
> based appliances which sometimes get turned off while under heavy IO). 
> Since ReiserFS doesn't do data journalling (metadata only), we
> consistently ended up with corrupt files.  After this, I decided to try
> ext3 with data=journal, and I never even got far enough with load testing
> to try the 'hard reset' test.  It would consistently crash in the fs code
> under heavy load.

This should be considered a serious bug, dont you think. Have you
reported this to the kernel list? I have the list now on the CC, but it
probably should be made as a bug report.


> 
> We have since had no problems with data=ordered, and since it writes data
> blocks before writing metadata to the journal, we don't see corrupt files
> anymore (even on hard resets).

Ok

> 
> If data integrity (within the file) is important to you in the face of a
> crash or power loss, do NOT use ReiserFS or ext3 data=writeback.   If your
> application never overwrites data in files, you will be just fine using
> data=ordered (appending to files or creating new files is pretty much
> guaranteed to never cause corruption).  If you need to overwrite data in
> files, you need to use data=journal (and probably beg people to fix it) or
> rewrite your application to use some other method (i.e. copy the file,
> delete the old one) and just use data=ordered.
> 

So data=journal would gain safer data integrity (if it works as intended then) 
than using data=ordered. But if data=journal does not work correctly we may be 
better off using data=ordered if we design our application after it. The problem 
is that we can not do this consistent because we have a mix of both open source 
applications and our own developed applications.

But think of your scenario  of copy, delete and make a new file with the new content.
First we copy the contents of the file, then we do our modifications. When we are done 
we delete the original file. Then we hit a crash. The content we had of the file in our process are 
gone, the original file is deleted. This is not a good idea. But if we write the new 
file first as fileX.new and den delete fileX, hit a crash then we would have at least the 
correct file written as fileX.new.

But we would be best off if we could trust the filesystem. 

In practise there are probably many more systems out there which use data=ordered because 
this is the default, and therefor get best testet. 

Journaling both data and metadata was what Dr. Tweedie did in the first public releases,
but the goal was not to do it. 

It is not easy to know what is the best thing to do.

We use this ext3 filesystem on a compact flash in an embedded system. 

Petter

  parent reply	other threads:[~2004-06-17 11:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <40FB8221D224C44393B0549DDB7A5CE83E31B1@tor.lokal.lan>
2004-06-15 18:09 ` Petter Larsen
2004-06-15 18:20   ` Eugene Crosser
2004-06-17  8:36     ` Petter Larsen
2004-06-16  7:34   ` Oleg Drokin
2004-06-17  8:27     ` Petter Larsen
2004-06-17 17:09       ` Oleg Drokin
2004-06-18  9:41         ` Helge Hafting
2004-06-18 10:15           ` Oleg Drokin
2004-06-18 11:30             ` Paulo Marques
2004-06-18 12:05               ` Oleg Drokin
2004-06-21 17:42                 ` mode data=journal in ext3. Is it safe to use? Conclusion Petter Larsen
2004-06-19 19:16               ` mode data=journal in ext3. Is it safe to use? Bernd Eckenfels
2004-06-16 15:49   ` Timothy Miller
2004-06-17  0:51     ` Daniel Pittman
2004-06-17  3:02       ` Tim Connors
2004-06-17  5:35       ` Hans Reiser
2004-06-17 10:08         ` Dave Jones
2004-06-17 16:55           ` Hans Reiser
2004-06-17  8:29     ` Petter Larsen
2004-06-17 19:30       ` Daniel Egger
     [not found]       ` <87wu26mto2.fsf@enki.rimspace.net>
2004-06-27 14:17         ` Petter Larsen
2004-06-28  0:22           ` Daniel Pittman
     [not found]     ` <1805.216.148.213.196.1087426691.squirrel@www.code-visions.com>
2004-06-17 11:23       ` Petter Larsen [this message]
2004-06-17 16:26         ` Andreas Dilger
2004-06-17 14:56 Ken Ryan
2004-06-17 16:06 ` Timothy Miller
2004-06-17 17:20   ` Hans Reiser
2004-06-17 19:15     ` Ken Ryan
2004-06-18  6:18       ` Hans Reiser
2004-06-17 19:43     ` Daniel Egger
2004-06-17 19:59       ` Ken Ryan
2004-06-19 14:49 ` Petter Larsen

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=1087471412.2765.209.camel@pla.lokal.lan \
    --to=pla@morecom.no \
    --cc=ext3-users@redhat.com \
    --cc=ext3@philwhite.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®