Re: FSSetForkSize writing massive amounts of data over network?
Re: FSSetForkSize writing massive amounts of data over network?
- Subject: Re: FSSetForkSize writing massive amounts of data over network?
- From: Mark Day <email@hidden>
- Date: Thu, 3 Feb 2011 09:16:11 -0800
On Feb 2, 2011, at 9:39 PM, James Bucanek wrote: What's really weird (to me) is that the client is the one doing the writing. In exactly the same configuration, the client OS X system can determine that the destination AFP file server is capable of copying files locally (a feature I use often) and will off-load the entire file duplication to the server. But it can't figure out that the server supports something as simple as "set EOF" so it has to write a billion zeros over the network????
The server does support "set EOF", but the protocol doesn't guarantee that the additional space is zero filled. Your memory of HFS not behaving that way in Mac OS 9 and earlier is correct. Note that a Mac OS X client might connect to a Mac OS 9 server, or a server on another platform that also does not zero fill newly allocated space.
The AFP client on Mac OS X also chooses the POSIX behavior of guaranteeing that the additional space will read back as zeroes. Since it can't tell that the server will do that itself, the client ends up doing it. The AFP protocol would have to be extended to communicate whether the server zero fills newly allocated space, the server would have to implement it, and the client would have to ask, before it could know that writing all those zeroes is unnecessary. (And we'd probably need to have local file systems also indicate whether they guarantee zeroes in newly allocated space, and the server would have to check that before returning its answer over the network.)
The actualCount value returned for the network volume is the same as the requested value, indicating a successful allocation. In my test case these were values between 100MB and 160GB. In every test, the free space reported by the volume remained the same.
That sounds like a bug to me.
-Mark
|
_______________________________________________
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