From owner-p4-projects@FreeBSD.ORG Mon Jul 2 13:10:45 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 49B2716A46F; Mon, 2 Jul 2007 13:10:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E785816A46B for ; Mon, 2 Jul 2007 13:10:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 92A9F13C457 for ; Mon, 2 Jul 2007 13:10:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 208AC8BF2BE; Mon, 2 Jul 2007 15:10:43 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K8NWdiAP+zqq; Mon, 2 Jul 2007 15:10:39 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id F34EE8BF185; Mon, 2 Jul 2007 15:10:38 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l62DAc17032049; Mon, 2 Jul 2007 15:10:38 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 2 Jul 2007 15:10:38 +0200 From: Roman Divacky To: John Baldwin Message-ID: <20070702131038.GA31701@freebsd.org> References: <200706281214.l5SCEhFq046327@repoman.freebsd.org> <200706292052.06861.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200706292052.06861.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 122480 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 13:10:45 -0000 On Fri, Jun 29, 2007 at 08:52:06PM -0400, John Baldwin wrote: > On Thursday 28 June 2007 08:14:43 am Roman Divacky wrote: > > http://perforce.freebsd.org/chv.cgi?CH=122480 > > > > Change 122480 by rdivacky@rdivacky_witten on 2007/06/28 12:14:14 > > > > vrele AFTER checking the vp for being on non-MPSAFE FS + some indentation > > problems that caused bad scoping > > > > Noticed by: rwatson (again ;) ) > > Umm, no. You need Giant for the vrele(). The proper fix is to use the > VFS_*_GIANT() macros and use int variables to know if you need to unlock > Giant or not. I dont see an easy and elegant way how to use the VFS_*_GIANT macros. I lock the giant in kern_get_at() function and unlock in function that calls this one. ie.: foo() { kern_get_at(...); ... if (VFS_NEEDSGIANT) mtx_unlock(&Giant); } I need to either propagate the vfslocked value from kern_get_at or lock the Giant in the foo() function. honestly I dont like either much what do you suggest?