[OpenAFS] Re: [OpenAFS-devel] OpenAFS callbacks
Mon, 11 Apr 2011 11:49:43 +0100
On 11 Apr 2011, at 10:58, Meisam Mohammadkhani <firstname.lastname@example.org=
> "The callback mechanism does not guarantee that you immediately see the ch=
anges someone else makes to a file you are using. Your Cache Manager does no=
t notice the broken callback until your application program asks it for more=
data from the file."
> Does that mean if we read for example first 100 Bytes of the file, repeate=
dly, if main file changes, callbacks don't inform the cache manager, until w=
e read for example byte 101?
What it means is that an application which has read() some data from a file w=
on't be notified by the cache manager that that data has changed. There's no=
mechanism in POSIX for the kernel to do so. However, If the application the=
n read()s that data again it will be given the most recent version - so if a=
callback has expired, then the cache manager will fetch the new data from t=
he fileserver, and you will get the newest file.
There is one exception to this behaviour on Unix. If you have opened a file f=
or writing, and dirtied that file, then the version of the data on your clie=
nt remains that at the point the file was dirtied - any subsequent changes o=
n the fileserver won't be delivered to your client until you close the open f=
ile handle (and the data is sent to the server)