Messages in this thread | | | Date | Sun, 29 Mar 2009 15:02:51 +0200 | From | Pavel Machek <> | Subject | Re: replace() system call needed (was Re: EXT4-ish "fixes" in UBIFS) |
| |
On Sun 2009-03-29 16:00:45, Artem Bityutskiy wrote: > Pavel Machek wrote: >>>>> 2. create/write/rename leads to empty files >>>> ..but this should not be. If we want to make that explicit, we should >>>> provide "replace()" operation; where replace is rename that makes sure >>>> that source file is completely on media before commiting the rename. >>> Well, OK, we can fsync() before rename, we just need clean rules >>> for this, so that all Linux FSes would follow them. Would be nice >>> to have final agreement on all this stuff. >> >> My proposal is >> >> rename() stays. > > It stays and: > > 1. does _not_ fsync
Does not fsync. If someone wants to make sure one of the files is on the disk, he should use replace(). [On non-linux systems, replace() should be implemented as fsync/rename in libc or something.] Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |