Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2012 16:43:08 -0500
From:      Kris Moore <kris@pcbsd.org>
To:        freebsd-arch@freebsd.org
Subject:   Re: unix domain sockets on nullfs(5)
Message-ID:  <4F0F53EC.1020608@pcbsd.org>
In-Reply-To: <BBDE763A-F55E-453D-A503-2489C9040EF6@freebsd.org>
References:  <86sjjobzmn.fsf@kopusha.home.net> <D1B8F00C-1E0D-4916-BD4B-FBCAE28E6F22@FreeBSD.org> <86fwfnti5t.fsf@kopusha.home.net> <CAOnPXZ_y5G6uEBWmfuH7qYBh%2B4Pw=O91ztCPEFCOTzWdCzx%2BRA@mail.gmail.com> <BBDE763A-F55E-453D-A503-2489C9040EF6@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/12/2012 16:39, Robert N. M. Watson wrote:
> On 12 Jan 2012, at 21:17, Mikolaj Golub wrote:
>
>> If we agree to have only the new behavior then nullfs won't need modification
>> at all, it will work as expected automatically. The patch could be (with updated
>> locking for the connect case):
>>
>> http://people.freebsd.org/~trociny/VOP_UNP.1.patch
> Greatly simplified.
>
>> --- sys/kern/uipc_usrreq.c	(revision 229979)
>> +++ sys/kern/uipc_usrreq.c	(working copy)
>> @@ -542,7 +542,7 @@
>>  
>>  	UNP_LINK_WLOCK();
>>  	UNP_PCB_LOCK(unp);
>> -	vp->v_socket = unp->unp_socket;
>> +	VOP_UNPBIND(vp, unp->unp_socket);
>>  	unp->unp_vnode = vp;
>>  	unp->unp_addr = soun;
>>  	unp->unp_flags &= ~UNP_BINDING;
>
> I still find myself worried by the fact that unp->unp_vnode points at the nullfs vnode rather than the underlying vnode, but haven't yet managed to identify any actual bugs that would result. I'll continue pondering it over the weekend :-).
>
> Robert_______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
FYI - Not sure if this helps, but we've been using this patch to expose
sockets in the lower layer for 2+ years now, haven't run into any issues
as of yet.

http://trac.pcbsd.org/browser/pcbsd/current/build-files/src-patches/nullfs-patch

-- 
Kris Moore
PC-BSD Software
iXsystems




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F0F53EC.1020608>