[OpenAFS-devel] Re: OpenAFS and OpenSolaris

Andrew Deason adeason@sinenomine.net
Fri, 12 Jun 2009 08:53:19 -0500


This is a multi-part message in MIME format.

--Multipart=_Fri__12_Jun_2009_08_53_19_-0500_dkazh85V3aouG6ud
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

(BCC'd to openafs-bugs)

On Fri, 12 Jun 2009 08:55:26 +0200
Klas Heggemann <klas@nada.kth.se> wrote:

> > Ah, right.
> >
> > dtrace, then. Try the following after the afs module is loaded and  
> > when starting afsd. This will show you what's going on inside the  
> > module and report the function return values.
> 
> 
> Thanks. (One of these days I'm gonna start learning/using
> dtrace ....).
> 
> As Jeffry Altman wrote,  its the code in rx/SOLARIS/rx_knet.c that is
> interessting.  dtrace show that the solookup routine fails, which is
> confirmed if I  add extra printf in the code. Seems like this route
> has changed and one need to find out how to adapt the code to these
> changes.

Try this; the attach patch appears to work with 1.4.11rc1, or at least
it doesn't fail like before, on snv_111b (after I patch 1.4.11rc1 to
actually build, see 124923). solookup and socreate behave differently
and appear to have differenet signatures than what the rxk code assumes.
Specifically, solookup was failing because it returns an error code, not
a vp, so it returns 0 on success, we interpret it as a NULL and a
failure, so it fails.

The AFS_SUN511_ENV in this is a bit coarse-grained if the old code
worked with previous releases of OpenSolaris. If someone knew when these
interfaces changed, that'd be helpful. Or we could have a configure test
for the new kernel sockets stuff, and try to use those.

-- 
Andrew Deason
adeason@sinenomine.net

--Multipart=_Fri__12_Jun_2009_08_53_19_-0500_dkazh85V3aouG6ud
Content-Type: application/octet-stream;
 name="rxk-opensolaris-sockets.diff"
Content-Disposition: attachment;
 filename="rxk-opensolaris-sockets.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9yeC9TT0xBUklTL3J4X2tuZXQuYyBiL3NyYy9yeC9TT0xBUklTL3J4
X2tuZXQuYwppbmRleCAxOWQ0YWI2Li5mOTUxNjE3IDEwMDY0NAotLS0gYS9zcmMvcngvU09MQVJJ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