mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: "Andreas T.Auer" <andreas.t.auer_lkml_73537@ursus.ath.cx>
Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: Zero length files - an alternative approach?
Date: Sun, 29 Mar 2009 13:10:23 +0100	[thread overview]
Message-ID: <yw1x1vsg4jio.fsf@thrashbarg.mansr.com> (raw)
In-Reply-To: <49CF636A.3030400@ursus.ath.cx> (Andreas T. Auer's message of "Sun, 29 Mar 2009 14:02:50 +0200")

"Andreas T.Auer" <andreas.t.auer_lkml_73537@ursus.ath.cx> writes:

> On 29.03.2009 13:22 Måns Rullgård wrote:
>> Consider this scenario:
>>
>> 1. Create/write/close newfile
>> 2. Rename newfile to oldfile
>> 3. Open/read oldfile.  This must return the new contents.
>> 4. System crash and reboot before delayed allocation/flush complete
>> 5. Open/read oldfile.  Old contents now returned.
>>
>> This rollback isn't obviously, to me at least, without problems of its
>> own.
>>   
> Having the old data in 5) is far better than having no data in 5).

Of course having old data is better than no data.  However, fsync()
and similar approaches make a rollback to old data after new data has
been visible impossible or far less likely than the suggested one.
I'm not saying it's necessarily a problem, only that it is a
difference that should be taken into account.

-- 
Måns Rullgård
mans@mansr.com

  reply	other threads:[~2009-03-29 12:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-29 10:43 Graham Murray
2009-03-29 11:22 ` Måns Rullgård
2009-03-29 12:02   ` Andreas T.Auer
2009-03-29 12:10     ` Måns Rullgård [this message]
2009-03-29 13:49       ` Pavel Machek
2009-03-29 20:16         ` David Newall
2009-03-30 12:41   ` Chris Mason
2009-03-30 14:06     ` Theodore Tso
2009-03-29 16:49 ` Avi Kivity
     [not found] <cl0KI-3zZ-3@gated-at.bofh.it>
     [not found] ` <cl1oA-4El-9@gated-at.bofh.it>
     [not found]   ` <clp6o-91-17@gated-at.bofh.it>
2009-03-30 21:10     ` Bodo Eggert

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=yw1x1vsg4jio.fsf@thrashbarg.mansr.com \
    --to=mans@mansr.com \
    --cc=andreas.t.auer_lkml_73537@ursus.ath.cx \
    --cc=linux-ext4@vger.kernel.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®