[477] in Info-AFS_Redistribution

home help back first fref pref prev next nref lref last post

Re: fsync() and close()

daemon@ATHENA.MIT.EDU (John Gardiner Myers)
Tue Dec 3 12:54:19 1991

Date: Tue,  3 Dec 1991 12:02:51 -0500 (EST)
From: John Gardiner Myers <jm36+@andrew.cmu.edu>
To: Info-AFS@transarc.com
In-Reply-To: <9112031556.AA19097@hal-2000.MIT.EDU>

From what I remember of AFS semantics:

close() will normally return after the storeback has been initiated,
but will not wait for the file transfer to complete.  Checking the
return value of close will catch such things as the user being over
quota and the server being down, but will not catch such things as the
server or network going down in the middle of the file transfer, etc.
There is an ioctl() you can do to the file descriptor to make the
client wait for the file transfer to complete before returning from
the close() system call.

Even if close() detects an error condition, it still invalidates the
file descriptor, so your strategies for doing error recovery are
limited.

				_.John

home help back first fref pref prev next nref lref last post