[OpenAFS-devel] Breaking callbacks on unlink
Derrick Brashear
shadow@gmail.com
Tue, 24 Jan 2012 21:46:53 -0500
On Tue, Jan 24, 2012 at 2:52 PM, Andrew Deason <adeason@sinenomine.net> wro=
te:
> Someone asked me about this recently, and I don't have a good
> explanation of why this is the current behavior.
>
> Currently, a fileserver will NOT break callbacks for a file that is
> being removed. If it gets unlinked and the link count remains above 0,
> we of course do break callbacks since that's just a number changing in
> the metadata, but we don't when the file actually goes away. This is
> this section in the fileserver, in afsfileprocs.c in SAFSS_RemoveFile:
>
> =A0 =A0/* Handle internal callback state for the parent and the deleted f=
ile */
> =A0 =A0if (targetptr->disk.linkCount =3D=3D 0) {
> =A0 =A0 =A0 =A0/* no references left, discard entry */
> =A0 =A0 =A0 =A0DeleteFileCallBacks(&fileFid);
> [...]
> =A0 =A0} else {
> [...]
> =A0 =A0 =A0 =A0/* tell all the file has changed */
> =A0 =A0 =A0 =A0BreakCallBack(client->host, &fileFid, 1);
> =A0 =A0}
This was in AFS 3.0 beta, 1989, and was in every revision I have back
to the initial September 1988 version of the file I have.
--=20
Derrick