Re: nullfs and named pipes.



On Fri, Feb 16, 2007 at 12:54:39PM +0000, Robert Watson wrote:

On Thu, 15 Feb 2007, Kostik Belousov wrote:

On Thu, Feb 15, 2007 at 03:22:59PM +0000, Josef Karthauser wrote:
On Thu, Feb 15, 2007 at 02:57:50PM +0100, Jeremie Le Hen wrote:

Note that all processes within a jail can only intefere with processes
from another jail or host as if they were on different machines. This
means they can communicate through PF_INET for instance but not PF_LOCAL.

You might think so! However that's not what's going on here.

The named pipe/nullfs issue is nothing to do with jails. It's just that
nullfs is broken with respect to named pipes as I've previously reported.
However with this patch:

cvs diff: Diffing .
Index: null_subr.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/nullfs/null_subr.c,v
retrieving revision 1.48.2.1
diff -u -r1.48.2.1 null_subr.c
--- null_subr.c 13 Mar 2006 03:05:17 -0000 1.48.2.1
+++ null_subr.c 14 Feb 2007 00:02:28 -0000
@@ -235,6 +235,8 @@
xp->null_vnode = vp;
xp->null_lowervp = lowervp;
vp->v_type = lowervp->v_type;
+ if (vp->v_type == VSOCK || vp->v_type == VFIFO)
+ vp->v_un = lowervp->v_un;

I'm wondering is some reference counting needed there ?

Yes, I find this a bit worrying also, but I don't know enough about how
nullfs works to reason about it. What happens when a vnode in the bottom
layer has its on-disk reference count drop to zero -- is the vnode in the
top layer invalidated somehow?

Vnode reclamation from lower layer cannot do anithing for corresponding nullfs
vnode, but that vnode has reference from nullfs vnode.
On the other hand, can forced unmount proceed for lower layer ?

Attachment: pgpcwDS5JOGTe.pgp
Description: PGP signature



Relevant Pages

  • Re: nullfs and named pipes.
    ... I'm wondering is some reference counting needed there? ... What happens when a vnode in the bottom ... Vnode reclamation from lower layer cannot do anithing for corresponding nullfs ...
    (freebsd-hackers)
  • Re: cvs commit: src/sys/fs/nullfs null.h null_subr.c null_vnops.c
    ... > vnode leak stuff that David has been investigating, ... Use mmap on a bunch of files on a nullfs, ... FS stacking in FreeBSD: it give the impression that it works ... if you proxy your VOP descriptors to another ...
    (freebsd-arch)
  • Re: nullfs and named pipes.
    ... What happens when a vnode in the bottom layer has its on-disk reference count drop to zero -- is the vnode in the top layer invalidated somehow? ... Vnode reclamation from lower layer cannot do anithing for corresponding nullfs vnode, but that vnode has reference from nullfs vnode. ...
    (freebsd-hackers)
  • Re: simplifying linux_emul_convpath()
    ... >> be simplified to just compare the vnode pointers rather than fetching ... >> the vnode attributes and comparing the attributes for equality. ... The typical user of something like this would be tar when it is deciding ... One could make a case for making a nullfs ...
    (freebsd-current)
  • Re: Recurring problem: processes block accessing UFS file system
    ... I'm use a lots of nullfs. ... holding a lock on vnode 0xc6c07bf4 and attempting to lock vnode ... a lock on vnode 0xc6bed3fc while attempting to lock vnode c6c07bf4. ...
    (freebsd-stable)