Re: "Flushing" a rename?
Re: "Flushing" a rename?
- Subject: Re: "Flushing" a rename?
- From: Dominic Giampaolo <email@hidden>
- Date: Tue, 13 May 2008 16:00:25 -0700
But I now have a second file that gets updated by writing the data a
temporary file which replaces the original file via a rename. After
the rename, how can I guarantee that all of the directory records
associated with that file have been flushed to disk?
A rename is guaranteed to be atomic on hfs. Either
it happens or it doesn't. If the system crashes you
will either have the temp file and the original file
or you will have only the renamed file.
You should of course fsync() the temp file before you
close it and do the rename.
--dominic
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden