Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 20:29:47 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mike Makonnen <mtm@identd.net>
Cc:        current@freebsd.org, phk@phk.freebsd.dk, Tim Robbins <tjr@freebsd.org>
Subject:   Re: MSDOSFS wastes 256k when nothing is mounted!
Message-ID:  <XFMail.20030221202947.jhb@FreeBSD.org>
In-Reply-To: <20030210041249.VPEI7656.out002.verizon.net@kokeb.ambesa.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 10-Feb-2003 Mike Makonnen wrote:
> On Mon, 10 Feb 2003 13:31:48 +1100
> Tim Robbins <tjr@freebsd.org> wrote:
> 
>> 
>> hashinit() can sleep, and I don't think it's safe to sleep here
>> (msdosfs_hashget() and msdosfs_hashins()) with dehash_mtx and
>> sometimes a vnode lock held.
> 
> Doh! I should have noticed that.
> 
>> 
>> It might be better to initialise the table the first time an
>> msdosfs filesystem is mounted.
>> 
> 
> Sounds reasonable enough. So, maybe allocate it in msdosfs_mount or mountmsdosfs
> and deallocate it in msdosfs_unmount? If there isn't an easy way to tell if
> you're on the last mounted msdos filesystem, it might be better to just
> leave the deallocation in msdosfs_uninit. Is that basically what you're saying?

That sounds good.  You can call a function defined in msdofs_denode.c
from the mount vfsop to init the hash table if needed w/o having to
expose the actual hash table to the vfsops.c file.  Just export the
function.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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?XFMail.20030221202947.jhb>