From owner-freebsd-hackers Thu Nov 14 14:11:46 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 3463137B401 for ; Thu, 14 Nov 2002 14:11:45 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1D6843E9E for ; Thu, 14 Nov 2002 14:11:38 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gAEMBcFC067879; Thu, 14 Nov 2002 14:11:38 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gAEMBbfe067878; Thu, 14 Nov 2002 14:11:37 -0800 (PST) (envelope-from dillon) Date: Thu, 14 Nov 2002 14:11:37 -0800 (PST) From: Matthew Dillon Message-Id: <200211142211.gAEMBbfe067878@apollo.backplane.com> To: Terry Lambert Cc: Cameron Grant , freebsd-hackers@freebsd.org, "Daniel O'Connor" , Hans Zaunere Subject: Re: Patch #6 (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> <200211141929.gAEJTQcl067196@apollo.backplane.com> <3DD3FC96.8420F54C@mindspring.com> 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: :> So this patch is a hack. It returns special devices directly whenever :> possible but must still synthesize temporary vnodes for them for :> RENAME and DELETE operations. But short of rewriting a big chunk of :> the device tracking infrastructure there is no other solution. : :If you are going to do that, why not just add: : :static vop_t **nullfs_specop_p; :static struct vnodeopv_entry_desc nullfs_specop_entries[] = { :... :}; :static struct vnodeopv_desc fs_specop_opv_desc = : { &nullfs_specop_p, nullfs_specop_entries }; :VNODEOP_SET(nullfs_specop_opv_desc); : :??? : :That way the devices get exported directly (still), but the rename, :delete, and other code can be left alone. : :It's really ugly to think of a "nullfs" doing this, though, so :I guess it's sixes on which approach is used. Told you it was :crufty. 8-(. : :-- Terry Hmm. That might just work since unionfs (with the patch) doesn't try to cache non-regular vnodes, and (nullfs doesn't try to cache anything). It would allow us to call addalias() and track v_rdev (though there might be a problem with sequencing since calling addalias while still holding lowervp or uppervp temporarily bump the count above 1 and possibly confuse the device driver into believing that the device has been opened when it may not have been). Unionfs and nullfs would still have to be aware of all the special vnode types. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message