From owner-freebsd-current Sun Feb 9 12:13:33 2003 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 18D9F37B401 for ; Sun, 9 Feb 2003 12:13:32 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCD0943F3F for ; Sun, 9 Feb 2003 12:13:30 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id HAA14150; Mon, 10 Feb 2003 07:13:18 +1100 Date: Mon, 10 Feb 2003 07:13:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp Cc: current@FreeBSD.ORG Subject: Re: MSDOSFS wastes 256k when nothing is mounted! In-Reply-To: <31456.1044819599@critter.freebsd.dk> Message-ID: <20030210070457.E2848-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 9 Feb 2003, Poul-Henning Kamp wrote: > I don't have any msdos filesystems mounted, yet: > > kern.malloc: > Type InUse MemUse HighUse Requests Size(s) > [...] > MSDOSFS mount 1 256K 256K 1 > [...] > > due to this: > > /*ARGSUSED*/ > int > msdosfs_init(vfsp) > struct vfsconf *vfsp; > { > dehashtbl = hashinit(desiredvnodes/2, M_MSDOSFSMNT, &dehash); > mtx_init(&dehash_mtx, "msdosfs dehash", NULL, MTX_DEF); > return (0); > } > > Somebody: please fix so this doesn't suck. msdosfs just cloned the bad example set by ufs: %%% int ufs_init(vfsp) struct vfsconf *vfsp; { ufs_ihashinit(); #ifdef QUOTA dqinit(); #endif #ifdef UFS_DIRHASH ufsdirhash_init(); #endif return (0); } void ufs_ihashinit() { ihashtbl = hashinit(desiredvnodes, M_UFSIHASH, &ihash); mtx_init(&ufs_ihash_mtx, "ufs ihash", NULL, MTX_DEF); } %%% Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message