From owner-freebsd-hackers Wed Nov 13 18: 6:13 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 A31A837B401 for ; Wed, 13 Nov 2002 18:06:11 -0800 (PST) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01F3643E6E for ; Wed, 13 Nov 2002 18:06:11 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0374.cvx22-bradley.dialup.earthlink.net ([209.179.199.119] helo=mindspring.com) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18C9OM-00067O-00; Wed, 13 Nov 2002 18:06:02 -0800 Message-ID: <3DD30492.68FE18E6@mindspring.com> Date: Wed, 13 Nov 2002 18:04:02 -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> <3DD2DF3A.18489E80@mindspring.com> <200211132358.gADNwAVP012795@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: > :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. > > It should be calling VOP_BMAP through the VP stored in the VM > object, which will be the underlying file, not the nullfs. Probably, but it's not doing that. The NULLFS implement VOP_BMAP as vop_eopnotsupp; it doesn't fall through. Even if it did fall through, the vfs_default.c code is not really written with stacking in mind, it's written with a local-media FS in mind. VOP_BMAP is simply not implemented for NULLFS, and is nearly impossible to implement correctly for a stacking VFS layer in any case, given the object aliasing problem. This is a deeply ingrained bug in FreeBSD's implementation of VFS stacking. The only safe workaround is to fail back to the read/write of the buffers, and lose coherency between instances of the FS... and that's what happens: you get coherency down, if you do explicit msync's, but lose it back up into the other instances local copies of the data. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message