From owner-freebsd-hackers Wed Nov 13 15:26:15 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5119337B401 for ; Wed, 13 Nov 2002 15:26:14 -0800 (PST) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id D892543E42 for ; Wed, 13 Nov 2002 15:26:13 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0015.cvx21-bradley.dialup.earthlink.net ([209.179.192.15] helo=mindspring.com) by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18C6tV-0003fy-00; Wed, 13 Nov 2002 15:26:01 -0800 Message-ID: <3DD2DF3A.18489E80@mindspring.com> Date: Wed, 13 Nov 2002 15:24:42 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon Cc: Daniel O'Connor , Hans Zaunere , freebsd-hackers@FreeBSD.ORG Subject: Re: Shared files within a jail References: <20021113034726.75787.qmail@web12801.mail.yahoo.com> <1037159767.66058.34.camel@chowder.localdomain> <200211130530.gAD5UxNt067928@apollo.backplane.com> <3DD1FAB9.82607C41@mindspring.com> <200211131114.gADBE3lM069566@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > :> Try using null mounts. The warning is in there because making the > :> null mount code work is a real hack and the authors aren't entirely > :> sure that everything's gotten covered. That said, use of a null mount > :> is certainly a lot safer if the stuff behind the mount is mostly > :> static. > : > :The problem is in the VM object alias code. Specifically, the > :getpages/putpages have to be implemented in terms of read/write, > :so that there are not two vm_object_t's that refer to the same > :data, since there is no "upcall" to notify of changes in a lower > :layer, and therefore guarantee coherency. > > I'm fairly sure the VM issues were fixed when VOP_GETVOBJECT was > added. A file accessed via a null mount will have the same VM object > as the file in the original filesystem. I'm not 100% sure about > that, I wasn't the one who did it, but I seem to recall it being > discussed. VOP_GETVOBJECT is a different name, but the VOP was my suggestion, to allow an upper layer to obtain a backing object, and to collapse intermediate layers. The issue is that the NULLFS getpages falls through the the vfs_default.c vop_stdgetpages(), which calls the function vnode_pager_generic_getpages(), which in turn, calls VOP_BMAP(), which in null_vnops.c is vop_eopnotsupp(), so it falls back to vnode_pager_input_smlfs(), which VOP_BMAP()'s *again*, but off the device. At which point, you've lost coherency. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message