[OpenAFS-devel] Can I force an AFS client not to cache a file?

Derrick J Brashear shadow@dementia.org
Tue, 17 Sep 2002 15:49:37 -0400 (EDT)


On 17 Sep 2002, Christos Ricudis wrote:

> I am building a custom logging solution for our AFS cell. In
> essence, I'm just logging all SRXAFS_FetchData() calls in fileserver, so
> when a specific FID is read by a client, a log entry is written
> somewhere.
>
> This works as long as the file is not in the client cache.

Hopefully this is not an application where you're going to hate yourself
for performance reasons?

> Is there a way to tell an AFS client NOT to cache a specific file, or
> to force a callback on that file so next time the client tries to read
> the file, the server is notified?

The easiest thing to do is probably to add a thread to the fileserver that
runs every (i don't know, say, 20 seconds) which loops over the callbacks
outstanding and revokes all the callbacks for the file in question.
Doubtless there are better ways but that's off the top of my head.

And I suspect you will hate life if you do this on a fileserver with real
traffic on it, but you can try.

-D