From owner-freebsd-current Fri Feb 21 17:29:40 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 3141A37B406 for ; Fri, 21 Feb 2003 17:29:36 -0800 (PST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5B8F43FE1 for ; Fri, 21 Feb 2003 17:29:35 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 20650 invoked from network); 22 Feb 2003 01:29:47 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 22 Feb 2003 01:29:47 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h1M1T3hT005684; Fri, 21 Feb 2003 20:29:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030210041249.VPEI7656.out002.verizon.net@kokeb.ambesa.net> Date: Fri, 21 Feb 2003 20:29:47 -0500 (EST) From: John Baldwin To: Mike Makonnen Subject: Re: MSDOSFS wastes 256k when nothing is mounted! Cc: current@freebsd.org, phk@phk.freebsd.dk, Tim Robbins 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 10-Feb-2003 Mike Makonnen wrote: > On Mon, 10 Feb 2003 13:31:48 +1100 > Tim Robbins 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 <>< 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