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

Garrett Wollman wollman@khavrinen.lcs.mit.edu
Mon, 10 May 2004 22:11:03 -0400 (EDT)


<<On Mon, 10 May 2004 19:02:26 -0400, Jeffrey Hutzelman <jhutz@cmu.edu> said:

> But note that it's not exact.  Your proposed afs_assign_process_label() 
> doesn't actually provide a means to control what label is assigned.

Intentionally -- the AFS code should not preclude a model in which
PAGs are actually addresses, which gives you a way to guarantee
uniqueness in an SMP-friendly manner.  Near as I can tell, except for
the niggling little bits where AFS tries to fit uids and PAGs into the
same name space, the kernel code just uses the PAG numbers as nonces,
so it matters little if the numbers actually represent pointers.  When
I was last looking at the code, about six months ago, I thought that
the uid versus PAG confusion was fixable fairly easily: just lazily
create a pseudo-PAG for every uid that touches AFS.  If the system
provides the right sort of hooks (FreeBSD does not, at the moment) you
can even GC them easily.

> And, afs_get_label() expects to operate on a process, where what we
> currently want is a struct ucred or whatever passes for it.  But
> then, that's platform-dependent code anyway, so it's not that big a
> deal.

That was a mistake on my part, since there are a number of places in
the filesystem code where all you have is a credential and not a
process anyway.

-GAWollman