From owner-freebsd-current@FreeBSD.ORG Mon Jun 2 09:04:13 2003 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 6ECCE37B401; Mon, 2 Jun 2003 09:04:13 -0700 (PDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id D72DA43F85; Mon, 2 Jun 2003 09:04:12 -0700 (PDT) (envelope-from hmp@nxad.com) Received: by perrin.int.nxad.com (Postfix, from userid 1072) id E2C712105A; Mon, 2 Jun 2003 09:04:11 -0700 (PDT) Date: Mon, 2 Jun 2003 09:04:11 -0700 From: Hiten Pandya To: Terry Lambert Message-ID: <20030602160411.GA24490@perrin.int.nxad.com> References: <20030602014757.GA99626@perrin.int.nxad.com> <3EDB6A6F.827B7C22@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EDB6A6F.827B7C22@mindspring.com> X-Operating-System: FreeBSD FreeBSD 4.7-STABLE User-Agent: Mutt/1.5.4i cc: current@FreeBSD.ORG cc: des@FreeBSD.ORG Subject: Re: VFS: C99 sparse format for struct vfsops 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 Jun 2003 16:04:13 -0000 On Mon, Jun 02, 2003 at 08:17:03AM -0700, Terry Lambert wrote: > Hiten Pandya wrote: > > My fingers have been itching to do this since the day phk@ planted this > > idea in my brain (re: cdevsw initialisations). Basically, it changes > > the vfsops to use C99 sparse format, just like cdevsw. It removes a lot > > of junk default initialisations, and duplication. > > I really dislike the changes to vfs_init(). Specifically, it's > not the overhead, so much as it's the implied side effects. And how many times is vfc_register() called? Its not in the patch of an I/O operation or anything. Its just a mount time overhead which will go through -- a one time thing. > Consider this going forward: someone adds a new VFSOP to the > list of allowable VFSOPs, and the vfs_init() doesn't have any > specific code for it. Considered. Now consider this, would you argue this about the sparse cdevsw initialisation in make_dev()? I hardly think so. It does a good job of centralising things, and making it easier for all of us. > This could happen with a new VFS implementation that gets loaded > as a module. While the current code can't really handle this > well, the changes move us further away from ever being able to > handle something like this. 8-(. But, up to now, this has not been a problem, unless you make it so. I don't think I even needed to add conditional checks for the mount and nmount ops in vfs_init. These are things which would be fault of developer if he doesn't update the `centralised' code, not yours or mine, or FreeBSD's. I also don't see the point of having a gazillion default ops being inited in every fs specific vector when we can just do this centrally. -- Hiten (hmp@FreeBSD.ORG)