[OpenAFS] Re: [OpenAFS-devel] OpenAFS callbacks

Meisam Mohammadkhani meisam.mohammadkhani@gmail.com
Mon, 11 Apr 2011 14:29:00 +0330


--90e6ba180d9a49f7db04a0a2785f
Content-Type: text/plain; charset=ISO-8859-1

Thank you. I guessed that it would be this way, but I thought that it's
better to ask for ensuring.

On Mon, Apr 11, 2011 at 2:19 PM, Simon Wilkinson <sxw@inf.ed.ac.uk> wrote:

>
> (removed openafs-devel)
>
> On 11 Apr 2011, at 10:58, Meisam Mohammadkhani <
> meisam.mohammadkhani@gmail.com> wrote:
> > "The callback mechanism does not guarantee that you immediately see the
> changes someone else makes to a file you are using. Your Cache Manager does
> not 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,
> repeatedly, if main file changes, callbacks don't inform the cache manager,
> until we read for example byte 101?
>
> No.
>
> What it means is that an application which has read() some data from a file
> won'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
> then 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 the fileserver, and you will get the newest file.
>
> There is one exception to this behaviour on Unix. If you have opened a file
> for writing, and dirtied that file, then the version of the data on your
> client remains that at the point the file was dirtied - any subsequent
> changes on the fileserver won't be delivered to your client until you close
> the open file handle (and the data is sent to the server)
>
> Cheers,
>
> Simon.

--90e6ba180d9a49f7db04a0a2785f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><font size=3D"2"><font face=3D"tahoma,sans-serif">Thank yo=
u. I guessed that it would be this way, but I thought that it&#39;s better =
to ask for ensuring.<br></font></font><br><div class=3D"gmail_quote">On Mon=
, Apr 11, 2011 at 2:19 PM, Simon Wilkinson <span dir=3D"ltr">&lt;<a href=3D=
"mailto:sxw@inf.ed.ac.uk">sxw@inf.ed.ac.uk</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
(removed openafs-devel)<br>
<div class=3D"im"><br>
On 11 Apr 2011, at 10:58, Meisam Mohammadkhani &lt;<a href=3D"mailto:meisam=
.mohammadkhani@gmail.com">meisam.mohammadkhani@gmail.com</a>&gt; wrote:<br>
&gt; &quot;The callback mechanism does not guarantee that you immediately s=
ee the changes someone else makes to a file you are using. Your Cache Manag=
er does not notice the broken callback until your application program asks =
it for more data from the file.&quot;<br>


&gt;<br>
&gt; Does that mean if we read for example first 100 Bytes of the file, rep=
eatedly, if main file changes, callbacks don&#39;t inform the cache manager=
, until we read for example byte 101?<br>
<br>
</div>No.<br>
<br>
What it means is that an application which has read() some data from a file=
 won&#39;t be notified by the cache manager that that data has changed. The=
re&#39;s no mechanism in POSIX for the kernel to do so. However, If the app=
lication then read()s that data again it will be given the most recent vers=
ion - so if a callback has expired, then the cache manager will fetch the n=
ew data from the fileserver, and you will get the newest file.<br>


<br>
There is one exception to this behaviour on Unix. If you have opened a file=
 for writing, and dirtied that file, then the version of the data on your c=
lient remains that at the point the file was dirtied - any subsequent chang=
es on the fileserver won&#39;t be delivered to your client until you close =
the open file handle (and the data is sent to the server)<br>


<br>
Cheers,<br>
<font color=3D"#888888"><br>
Simon.</font></blockquote></div><br></div>

--90e6ba180d9a49f7db04a0a2785f--