Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Feb 2003 07:13:21 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        current@FreeBSD.ORG
Subject:   Re: MSDOSFS wastes 256k when nothing is mounted!
Message-ID:  <20030210070457.E2848-100000@gamplex.bde.org>
In-Reply-To: <31456.1044819599@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030210070457.E2848-100000>