Author vstinner
Recipients Trundle, draghuram, eric.araujo, giampaolo.rodola, pitrou, r.david.murray, tarek, techtonik, vstinner
Date 2011-09-13.23:21:12
SpamBayes Score 1.49614e-05
Marked as misclassified No
Message-id <1315956073.01.0.422887896551.issue8828@psf.upfronthosting.co.za>
In-reply-to
Content
According to the following article, a fsync is also needed on the directory after a rename. I don't understand if is it always needed for an atomic rename, or if we only need it for the "atomic write" pattern.

http://lwn.net/Articles/457667/

"The more subtle usages deal with newly created files, or overwriting existing files. A newly created file may require an fsync() of not just the file itself, but also of the directory in which it was created (since this is where the file system looks to find your file). This behavior is actually file system (and mount option) dependent. You can either code specifically for each file system and mount option combination, or just perform fsync() calls on the directories to ensure that your code is portable."
History
Date User Action Args
2011-09-13 23:21:13vstinnersetrecipients: + vstinner, pitrou, draghuram, techtonik, giampaolo.rodola, tarek, eric.araujo, r.david.murray, Trundle
2011-09-13 23:21:13vstinnersetmessageid: <1315956073.01.0.422887896551.issue8828@psf.upfronthosting.co.za>
2011-09-13 23:21:12vstinnerlinkissue8828 messages
2011-09-13 23:21:12vstinnercreate