From owner-freebsd-current@FreeBSD.ORG Sun May 1 10:15:35 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 CA18B16A4CE for ; Sun, 1 May 2005 10:15:35 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 325F943D31 for ; Sun, 1 May 2005 10:15:35 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id j41AFS1h038110; Sun, 1 May 2005 06:15:28 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)j41AFRNl038107; Sun, 1 May 2005 06:15:28 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Sun, 1 May 2005 06:15:27 -0400 (EDT) From: Jeff Roberson To: Oleg Sharoiko In-Reply-To: <20050501114837.V649@localhost> Message-ID: <20050501061323.X71837@mail.chesapeake.net> References: <20050501034520.N71837@mail.chesapeake.net> <20050501114837.V649@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org 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: Sun, 01 May 2005 10:15:35 -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. > > 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. >