From: Phillip Susi <psusi@cfl.rr.com>
To: Thomas Bellman <bellman@nsc.liu.se>
Cc: Olaf van der Spek <olafvdspek@gmail.com>,
Massimo Maggi <massimo@mmmm.it>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Atomic file data replace API
Date: Sun, 09 Jan 2011 15:13:46 -0500 [thread overview]
Message-ID: <4D2A16FA.3040009@cfl.rr.com> (raw)
In-Reply-To: <4D2A04D4.8020503@nsc.liu.se>
On 01/09/2011 01:56 PM, Thomas Bellman wrote:
> That particular problem was solved with the introduction of the
> rename(2) system call in 4.2BSD a bit more than a quarter of a
> century ago. There is no need to introduce another, less flexible,
> API for doing the same thing.
I'm curious if there are any BSD specifications that state that rename()
has this behavior. Ted Tso has been claiming that POSIX does not
require this behavior in the face of a crash and that as a result, an
application that relies on such behavior is broken, and needs to fsync()
before rename(). This of course, makes replacing numerous files much
slower, glacially so on btrfs. There has been a great deal of
discussion ok the dpkg mailing lists about it since plenty of people are
upset that dpkg runs much slower these days than it used to, because it
now calls fsync() before rename() in order to avoid breakage on ext4.
You can read more, including the rationale of why POSIX does not require
this behavior at http://lwn.net/Articles/323607/.
I still say that preserving the order of the writes and rename is the
only sane thing to do, whether POSIX requires it or not.
next prev parent reply other threads:[~2011-01-09 20:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 20:01 Atomic file data replace API Olaf van der Spek
2011-01-07 13:55 ` Mike Fleetwood
2011-01-07 14:01 ` Olaf van der Spek
2011-01-07 14:10 ` Olaf van der Spek
2011-01-07 14:58 ` Chris Mason
2011-01-07 15:01 ` Olaf van der Spek
2011-01-07 15:05 ` Chris Mason
2011-01-07 15:08 ` Olaf van der Spek
2011-01-07 15:13 ` Chris Mason
2011-01-07 15:17 ` Olaf van der Spek
2011-01-07 16:12 ` Chris Mason
2011-01-07 16:19 ` Olaf van der Spek
2011-01-07 16:26 ` Hubert Kario
2011-01-07 19:29 ` Chris Mason
2011-01-08 14:40 ` Olaf van der Spek
2011-01-26 18:30 ` Olaf van der Spek
2011-01-26 19:30 ` Chris Mason
2011-01-26 21:56 ` Olaf van der Spek
2011-01-07 16:32 ` Massimo Maggi
2011-01-07 16:34 ` Olaf van der Spek
2011-01-07 19:29 ` Thomas Bellman
2011-01-08 14:36 ` Olaf van der Spek
2011-01-08 21:43 ` Thomas Bellman
2011-01-09 15:16 ` Olaf van der Spek
2011-01-09 18:56 ` Thomas Bellman
2011-01-09 19:06 ` Olaf van der Spek
2011-01-09 20:13 ` Phillip Susi [this message]
2011-01-08 1:11 ` Phillip Susi
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=4D2A16FA.3040009@cfl.rr.com \
--to=psusi@cfl.rr.com \
--cc=bellman@nsc.liu.se \
--cc=linux-btrfs@vger.kernel.org \
--cc=massimo@mmmm.it \
--cc=olafvdspek@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).