From owner-freebsd-fs@FreeBSD.ORG Mon Nov 8 14:38:43 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 6B03F10656AB for ; Mon, 8 Nov 2010 14:38:43 +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 2335D8FC20 for ; Mon, 8 Nov 2010 14:38:42 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PFSrp-0005bJ-I7 for freebsd-fs@freebsd.org; Mon, 08 Nov 2010 15:38:41 +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 15:38:41 +0100 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Nov 2010 15:38:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Mon, 08 Nov 2010 15:38:30 +0100 Lines: 21 Message-ID: References: <20101108143130.GA2799@tops> 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 In-Reply-To: <20101108143130.GA2799@tops> X-Enigmail-Version: 1.1.2 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 14:38:43 -0000 On 11/08/10 15:31, Gleb Kurtsou wrote: > On (08/11/2010 13:28), Ivan Voras wrote: >> I was looking at fusefs sources and there is a dance it does with the >> Giant lock which looks fishy. > It's intended to be fishy. No kernel level locks should be held before > returning to userland, in other words on each syscall vnode is locked (+ > Gaint lock for fs if needed), than it's unlocked by filesystem and > relocked upon callback from userspace. puffs is MPSAFE if that could be > of any help for you. I don't think we're talking completely about the same thing here. I'm talking about fuse's DO_GIANT_MANUALLY flag, with awareness that fuse does: 473 #ifdef MNTK_MPSAFE 474 mp->mnt_kern_flag |= MNTK_MPSAFE; 475 #endif What are you talking about?