LWN.net Logo

Ts'o: Delayed allocation and the zero-length file problem

Ts'o: Delayed allocation and the zero-length file problem

Posted Mar 13, 2009 16:25 UTC (Fri) by droundy (subscriber, #4559)
In reply to: Ts'o: Delayed allocation and the zero-length file problem by welinder
Parent article: Ts'o: Delayed allocation and the zero-length file problem

Similarly, all FSs should try hard to make sure open-write-close-rename leaves you with either the new or the old file. Anything else isn't reasonable.

Absolutely. The problem with the argument that it must be open-write-fsync-close-rename is that that describes a *different* goal, which is to ensure that the new file is actually saved. When an application doesn't particularly care whether the new or old file is present in case of a crash, it'd be nice to allow them to ask only for the ordinary POSIX guarantees of atomicity, without treating system crashes as a special exception.

And on top of that, I'd prefer to think of all those Ubuntu gamers as providing the valuable service of searching for race conditions relating to system crashes. Personally, I prefer not to run nvidia drivers, but I'd like to use a file system that has been thoroughly tested by hard rebooting the computer, so that on the rare power outages, I'll not be likely to lose data. It'd be even nicer if lots of people were to stress-test their ext4 file systems by simply repeatedly hitting the hard reset button, but it's hard to see how to motivate people to do this.


(Log in to post comments)

Ts'o: Delayed allocation and the zero-length file problem

Posted Mar 13, 2009 18:26 UTC (Fri) by oak (subscriber, #2786) [Link]

> It'd be even nicer if lots of people were to stress-test their ext4 file
systems by simply repeatedly hitting the hard reset button, but it's hard
to see how to motivate people to do this.

If you have very small children, they can do it for you. When you least
want/expect it...

Anyway, it's not so hard to do an automated system for this and you can
also buy one. All the file system maintainers I know, do this kind of
testing.

Ts'o: Delayed allocation and the zero-length file problem

Posted Mar 14, 2009 18:03 UTC (Sat) by dkite (guest, #4577) [Link]

Used to be when the reset buttons were red and prominent. I speak from
experience.

Derek

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds