From: Theodore Ts'o <tytso@mit.edu>
To: 宋柏翰 <solarispika@gmail.com>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-ext4@vger.kernel.org
Subject: Re: Question on delalloc
Date: Tue, 4 Jun 2013 15:01:50 -0400 [thread overview]
Message-ID: <20130604190150.GR3030@thunk.org> (raw)
In-Reply-To: <CAJ1XODRNm6RyCNdQrUTKe2hOvECDVmxuzv6BUFY8eSX_MVSWSQ@mail.gmail.com>
On Wed, Jun 05, 2013 at 01:30:22AM +0800, 宋柏翰 wrote:
> Though what I tried to
> said is that delalloc'd data will stop kjournald from writing them
> back when it would like to do so, therefore those delalloc'd data will
> stay in memory more longer than those non-delalloc'd ones.
That's not why when you enable delayed allocation data can stay in
memory longer than when delalloc is disabled (or when ext3 is used).
So you were wrong about why this happens, although the observation is
correct.
> As described in http://lwn.net/Articles/322823/.
Please note that the current behaviour vis-a-vis buffered writes and
when you they will written to disk is generally true for all modern
file systems: xfs, btrfs, and ext4. The workaround described at the
end of the above article has been adopted by all of the modern file
systems, as a workaround for buggy user space applications (which at
one point included core libraries for both GNOME and KDE); this
workaround however is __not__ guaranteed by POSIX, and there are other
operationg systems, such as MacOS X, where you can't guarantee on
these semantics.
(In fact with MacOS, by default fsync() is even weaker than what POSIX
guarantees; you need use fcntl(F_FULLSYNC) to get POSIX guarantees.)
More context can be found here:
http://blahg.josefsipek.net/?p=364
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-06-04 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 19:00 Question on delalloc 宋柏翰
2013-06-04 5:22 ` Theodore Ts'o
2013-06-04 14:26 ` Eric Sandeen
2013-06-04 17:30 ` 宋柏翰
2013-06-04 19:01 ` Theodore Ts'o [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=20130604190150.GR3030@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=solarispika@gmail.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;
as well as URLs for NNTP newsgroup(s).