Re: flushing HFS cache to disk
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com At 02:35 PM -0800 2005-11-30, Timothy J. Wood wrote:
On Nov 30, 2005, at 1:53 PM, Peter Bierman wrote:
But all the filesystem operations _do_ have transactional semantics.
The issue here is that someone is trying to read from the disk _behind the back_ of the filesystem. There is NO provision for that while the filesystem is in use.
They have transactional semantics in that each individual operation is atomic
That's not even true. If you do this: create-write1-write2-write3-close and the system crashes, the result must be one of: no such file empty file file with write1 file with write1-write2 file with write1-write2-write3 but not file with write2 file with write1-hole-write3 file with hole-write3 Do all journaling volume drivers make this guarantee? I think not. I suppose you could write the file as a temp file, do a synchronous flush of the file, then move it into place. This is of course, a hack on top of an API that was never designed to be transactional. And you could still end up with a temp file lying around after a crash. Years ago there was a Cromemco unix clone that let you create a file descriptor, write to it, then link it into a directory. That was a good idea that was rejected as unorthodox. Dave _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dave Yost