Re: flushing HFS cache to disk
Re: flushing HFS cache to disk
- Subject: Re: flushing HFS cache to disk
- From: Dave Yost <email@hidden>
- Date: Wed, 30 Nov 2005 18:27:59 -0800
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden