linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 103111] auto_da_alloc mount option not working
Date: Sat, 29 Aug 2015 03:25:15 +0000	[thread overview]
Message-ID: <bug-103111-13602-0pGHXtrvYz@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-103111-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=103111

Theodore Tso <tytso@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tytso@mit.edu

--- Comment #14 from Theodore Tso <tytso@mit.edu> ---
Rakesh, if you are aware of truly broken programs that rename first and then
write to the file (which means that they will lose data if they crash after the
rename), let me know.  The hueristics were designed to catch the most common
cases of application brain-damage, to it:

1)  write foo.new
2)  fail to use fsync(2) as they should
3)  close the file descriptor for foo.new
4)  rename foo.new to foo

The fact that we also catch the case of

1)  truncate a file containing data down to zero
2)  write a new version of the file, and hope you don't crash right after 1

Was because, if I recall correctly, both GNOME and KDE had something like this
in their library functions and a lot of programs were calling it.   ***Sigh***

I believe their excuse was that it was too hard to copy the ACL's and xattr's
from foo to foo.new, and by using a truncate, they wouldn't have to do all of
that hard work to read the acl and xattr's from the old file, and set them on
foo.new before doing the rename.

One especially brilliant application was rewriting the config file after each
time the window was moved a pixel or two, so that the window location could be
saved.   So if you dragged the window around, the file would get written dozens
if not hundreds of times.

Just in case you ever wondered why many file system developers don't trust
application / desktop programmers....

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2015-08-29  3:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 13:34 [Bug 103111] New: auto_da_alloc mount option not working bugzilla-daemon
2015-08-19 16:13 ` [Bug 103111] " bugzilla-daemon
2015-08-20  5:48 ` bugzilla-daemon
2015-08-20  5:53 ` bugzilla-daemon
2015-08-20  5:54 ` bugzilla-daemon
2015-08-21 14:56 ` bugzilla-daemon
2015-08-21 14:59 ` bugzilla-daemon
2015-08-21 15:13 ` bugzilla-daemon
2015-08-21 15:16 ` bugzilla-daemon
2015-08-21 18:36 ` bugzilla-daemon
2015-08-25 17:49 ` bugzilla-daemon
2015-08-25 18:05 ` bugzilla-daemon
2015-08-28 16:49 ` bugzilla-daemon
2015-08-28 16:51 ` bugzilla-daemon
2015-08-29  3:25 ` bugzilla-daemon [this message]
2015-08-29  3:28 ` bugzilla-daemon
2015-08-29 19:33 ` 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=bug-103111-13602-0pGHXtrvYz@https.bugzilla.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).