From owner-freebsd-fs@FreeBSD.ORG Mon Nov 8 15:05:10 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6744A10656BD; Mon, 8 Nov 2010 15:05:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3282C8FC12; Mon, 8 Nov 2010 15:05:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CB41046B35; Mon, 8 Nov 2010 10:05:09 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A65268A027; Mon, 8 Nov 2010 10:05:08 -0500 (EST) From: John Baldwin To: freebsd-fs@freebsd.org Date: Mon, 8 Nov 2010 10:04:59 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Message-Id: <201011081004.59640.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 08 Nov 2010 10:05:08 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Ivan Voras Subject: Re: The state of Giant lock in the file systems? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 15:05:10 -0000 On Monday, November 08, 2010 7:28:26 am Ivan Voras wrote: > I was looking at fusefs sources and there is a dance it does with the > Giant lock which looks fishy. > > Grepping for "-ir giant" in /sys/fs on 8-stable shows only a handful of > mentionings, but if I understand it correctly only these "active" instances: > > 1) one set of mtx_assert() calls on it in pseudofs, which I can't figure > out what they're guarding > 2) some manual locking and unlocking in nfsclient which appears to only > guard printf() (???) > 3) some more locking in nfsserver which apparently is only there to > guard the underlying local file system > 4) coda, which appears to be the only one marked with D_NEEDGIANT, but > doesn't do much of its own interfacing with it > > Except for these, is there any more magic that would need to be resolved > to excise Giant from VFS? > > Would it be correct to think that coda is the single biggest obstacle? Err, all the VFS_LOCK_GIANT() stuff for filesystems that do not have MNTK_MPSAFE set. I believe the currently MPSAFE fs's are UFS, ZFS, MSDOSFS, CD9660, UDF, NFS client, and devfs. I think all others are !MPSAFE still. -- John Baldwin