From owner-freebsd-current@FreeBSD.ORG Mon May 2 12:19:45 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F08F16A4CF for ; Mon, 2 May 2005 12:19:45 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EE9F43D53 for ; Mon, 2 May 2005 12:19:45 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1DSZtn-0009JK-3a; Mon, 02 May 2005 15:19:43 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: Jeff Roberson In-Reply-To: Message from Jeff Roberson <20050501061323.X71837@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 02 May 2005 15:19:42 +0300 From: Danny Braniss Message-ID: cc: freebsd-current@freebsd.org cc: Oleg Sharoiko cc: Kris Kennaway Subject: Re: diskless/unionfs panics X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 12:19:45 -0000 > On Sun, 1 May 2005, Oleg Sharoiko wrote: > > > > > On Sun, 1 May 2005, Jeff Roberson wrote: > > > > JR>Where is this patch? > > > > It was quoted by Danny in his mail http://docs.freebsd.org/cgi/mid.cgi?E1DRs0M-0006E4-9a > > I sent it him privately, because I wasn't sure about the patch. > > Yes, unfortunately this is only part of the problem. The v_object can > change on a unionfs vnode leading to inconsistent results for mmap/exec. > This also causes problems for unionfs mounted on top of unionfs as the > lower vp can also change v_object fields. This was one advantage to the > VOP based solution. It would propagate all the way down the stack on each > access. > so can we partialy solve the problem :-)? > > > > Here it is: > > ----- > > Index: union_vnops.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/fs/unionfs/union_vnops.c,v > > retrieving revision 1.131 > > diff -u -r1.131 union_vnops.c > > --- union_vnops.c 13 Apr 2005 10:59:08 -0000 1.131 > > +++ union_vnops.c 1 May 2005 07:50:27 -0000 > > @@ -748,6 +748,9 @@ > > if (error == 0) > > error = VOP_OPEN(tvp, mode, cred, td, -1); > > > > + if (error == 0) > > + ap->a_vp->v_object = tvp->v_object; > > + > > /* > > * Release any locks held. > > */ > > ----- > > > > I made it similar to the way it's done in nullfs. You can check my > > explanaitons quoted by Danny. > > > > -- > > Oleg Sharoiko. > > Software and Network Engineer > > Computer Center of Rostov State University. > >