From owner-freebsd-fs@FreeBSD.ORG Mon Nov 8 12:28:42 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 5C459106564A for ; Mon, 8 Nov 2010 12:28:42 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 11D758FC15 for ; Mon, 8 Nov 2010 12:28:41 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PFQq0-0004bC-6N for freebsd-fs@freebsd.org; Mon, 08 Nov 2010 13:28:40 +0100 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Nov 2010 13:28:40 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Nov 2010 13:28:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Mon, 08 Nov 2010 13:28:26 +0100 Lines: 19 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101102 Thunderbird/3.1.6 X-Enigmail-Version: 1.1.2 Subject: 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 12:28:42 -0000 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?