[OpenAFS-devel] to fsync() or not to fsync()

Jeffrey Hutzelman jhutz@cmu.edu
Thu, 14 Sep 2006 13:36:44 -0400


On Thursday, September 14, 2006 01:23:05 PM -0400 Ken Hornstein 
<kenh@cmf.nrl.navy.mil> wrote:

>> ...which is a "risk" almost any filesystem or application takes into
>> consideration, and allows the filesystem user to determine when it's
>> "really necessary" to wait to go forward until data is committed to
>> firm storage, or not.  Good or bad, the fileserver is assuming that's
>> what you want to do all of the time in the CopyOnWrite and
>> StoreData_RXStyle
>
> So, when I look at StoreData_RXStyle, I am not able to convince myself
> that the actual file data is fsync()'d ... unless fsync() is actually
> called on the client (and from what I see, fsync() IS passed from the
> client to the server).  I can believe there is some other fsync()s in
> there, certainly, but I don't think it's doing the bulk data (but hey,
> I've been wrong before when it comes to AFS program flow).

Huh?  There's no RPC for that.  And no, I don't think file data is synced, 
but metadata is, which is consistent with the behavior of many other 
filesystems.

If people are interested in speeding up operations like cloning and volume 
moves, I would agree that there's no reason the _volserver_ needs to be 
doing any syncing in the middle of those operations, since their 
granularity is whole-volume by definition.

-- Jeff