From: Dave Chinner <david@fromorbit.com>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: pvlogin@yahoo.com, xfs@oss.sgi.com
Subject: Re: Clarification about NULLs in the file after a crash
Date: Fri, 26 Sep 2008 17:11:28 +1000 [thread overview]
Message-ID: <20080926071128.GN27997@disturbed> (raw)
In-Reply-To: <48DC770D.1000308@sgi.com>
On Fri, Sep 26, 2008 at 03:45:49PM +1000, Lachlan McIlroy wrote:
> p v wrote:
>> Let's say that I did lseek/writev 10x - if I crash
>> after that according to the FAQ I can get NULLs in the file
>> - but - can I get it only at the end of the file or is it
>> possible to get NULLs in the middle as well? I could modify
>> my application to recover if it was only at the end
>> (ftruncate up to the last initialized data in the file) but
>> I cannot traverse the whole file and I don't want to
>> create checkpoints by doing fdatasync from time to time (at
>> that point I would consider to go up to the fixed version of
>> xfs).
> Good question. I think you could get gaps of NULLs in the start
> or middle of the file if the VM flushed data from the middle or
> end of the file first and then the inode was updated on disk.
> Since data at the start of the file has not been written out
> yet then no extents may have been allocated there yet either.
>
> That's just a guess though - I don't know if it could actually
> happen that way.
Yes, you can certainly still get NULLs in the middle of the file.
It just depends on the timing and writeback patterns. if you are
in low memory conditions, the VM will do random page writeback
which means that there is no guarantee which page gets written
first....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2008-09-26 7:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 4:50 Clarification about NULLs in the file after a crash p v
2008-09-26 5:45 ` Lachlan McIlroy
2008-09-26 7:11 ` Dave Chinner [this message]
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=20080926071128.GN27997@disturbed \
--to=david@fromorbit.com \
--cc=lachlan@sgi.com \
--cc=pvlogin@yahoo.com \
--cc=xfs@oss.sgi.com \
/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