From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 15910] zero-length files and performance degradation
Date: Mon, 10 May 2010 03:49:35 GMT [thread overview]
Message-ID: <201005100349.o4A3nZqB013514@demeter.kernel.org> (raw)
In-Reply-To: <bug-15910-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=15910
--- Comment #5 from Theodore Tso <tytso@mit.edu> 2010-05-10 03:49:25 ---
> The problem is, dpkg needs to guarantee the system is always usable,
> and when a crash occurs, say when it's unpacking libc, it's not
> acceptable for dpkg not to fsync() before rename() as it might end
> up with an empty libc.so file, even if it might have marked the
> package as correctly unpacked (wrongly but unknowingly as there's no
> guarantees), which is not true until the changes have been fully
> committed to the file system.
Why not unpack all of the files as "foo.XXXXXX" (where XXXXXX is a
mkstemp filename template) do a sync call (which in Linux is
synchronous and won't return until all the files have been written),
and only then, rename the files? That's going to be the most fastest
and most efficient way to guarantee safety under Linux; the downside
is that you need to have enough free space to store the old and the
new files in the package simultaneously. But this also is a win,
because it means you don't actually start overwriting files in a
package until you know that the package installation is most likely
going to succeed. (Well, it could fail in the postinstall script, but
at least you don't have to worry about disk full errors.)
- Ted
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next prev parent reply other threads:[~2010-05-10 3:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 13:49 [Bug 15910] New: zero-length files and performance degradation bugzilla-daemon
2010-05-05 18:54 ` [Bug 15910] " bugzilla-daemon
2010-05-06 4:06 ` bugzilla-daemon
2010-05-06 4:18 ` bugzilla-daemon
2010-05-09 18:19 ` bugzilla-daemon
2010-05-10 2:56 ` tytso
2010-05-10 14:22 ` Peng Tao
2010-05-10 14:34 ` tytso
2010-05-10 3:49 ` bugzilla-daemon [this message]
2010-05-10 14:36 ` bugzilla-daemon
2010-05-10 14:52 ` bugzilla-daemon
2010-05-10 17:23 ` bugzilla-daemon
2010-05-10 22:33 ` bugzilla-daemon
2011-03-07 0:30 ` bugzilla-daemon
2011-03-09 19:09 ` bugzilla-daemon
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=201005100349.o4A3nZqB013514@demeter.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).