From owner-p4-projects@FreeBSD.ORG Fri Jul 13 12:22:33 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 4570D16A4E1; Fri, 13 Jul 2007 12:22:33 +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 0E1A116A4CD; Fri, 13 Jul 2007 12:22:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id A055E13C461; Fri, 13 Jul 2007 12:22:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6DCMJHN003289; Fri, 13 Jul 2007 08:22:27 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Fri, 13 Jul 2007 08:21:58 -0400 User-Agent: KMail/1.9.6 References: <200706281214.l5SCEhFq046327@repoman.freebsd.org> <200706292052.06861.jhb@freebsd.org> <20070702131038.GA31701@freebsd.org> In-Reply-To: <20070702131038.GA31701@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707130822.00255.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 13 Jul 2007 08:22:27 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3656/Fri Jul 13 07:24:51 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx 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: Fri, 13 Jul 2007 12:22:33 -0000 On Monday 02 July 2007 09:10:38 am Roman Divacky wrote: > 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? I would lock Giant in foo() if you already have the vnode in foo(). -- John Baldwin