[OpenAFS-devel] Re: [OpenAFS] 2.6 kernel support anytime soon?Workarounds?

Jeffrey Hutzelman jhutz@cmu.edu
Tue, 11 May 2004 17:00:30 -0400


On Tuesday, May 11, 2004 15:32:20 -0500 "Douglas E. Engert" 
<deengert@anl.gov> wrote:

> If push comes to shove, (as it appears it has!) could the AFS
> code in effect shadow the process table (or task_struct), so when a
> request is needed if it has not seen this process before, it will look at
> the parent  and on up the chain to find a process it has seen that has a
> "PAG".

This is on the right track, but unfortunately, it's nowhere near that 
simple.  I have code lying around somewhere that does a pretty decent job 
at keeping track of PAGs without modifying setgroups.  Besides using the 
supplementary group list, it also uses a private per-process table, a magic 
open file descriptor, and will walk the chain from parent to parent looking 
for a pag.

Unfortunately, that's not enough.  Processes can fork.  They can become 
disconnected from their parents.  They can change their groups.  They can 
close files.  Worst, they can do all of these things at once.  The problem 
is not easy to solve if the OS does not give you the hooks you need to 
detect process creation and destruction.  Linux presently does not offer 
those hooks.


> In Linux 2.6 the address of the task_struct and its start_time
> might be all that needs to be shadowed along with some garbage
> collection.

I have no interest in remembering the address of a data structure that does 
not know that I have a reference to it.