From owner-cvs-all@FreeBSD.ORG Thu Oct 4 21:47:11 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D84A316A469; Thu, 4 Oct 2007 21:47:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7E213C465; Thu, 4 Oct 2007 21:47:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8p) with ESMTP id 212944590-1834499 for multiple; Thu, 04 Oct 2007 17:46:54 -0400 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 l94Lkcmo045765; Thu, 4 Oct 2007 17:46:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jeff Roberson Date: Thu, 4 Oct 2007 12:19:12 -0400 User-Agent: KMail/1.9.6 References: <200710032106.l93L65bv095725@repoman.freebsd.org> <20071003164642.B615@10.0.0.1> In-Reply-To: <20071003164642.B615@10.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710041219.13202.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]); Thu, 04 Oct 2007 17:46:42 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/4472/Thu Oct 4 10:45:39 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.7 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_03_06,SUBJ_HAS_SPACES autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/fs/devfs devfs_vnops.c src/sys/fs/fifofs fifo_vnops.c src/sys/kern uipc_usrreq.c vfs_vnops.c src/sys/vm vnode_pager.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2007 21:47:11 -0000 On Wednesday 03 October 2007 07:48:00 pm Jeff Roberson wrote: > On Wed, 3 Oct 2007, John Baldwin wrote: > > > jhb 2007-10-03 21:06:05 UTC > > > > FreeBSD src repository > > > > Modified files: (Branch: RELENG_6) > > sys/fs/devfs devfs_vnops.c > > sys/fs/fifofs fifo_vnops.c > > sys/kern uipc_usrreq.c vfs_vnops.c > > sys/vm vnode_pager.c > > Log: > > MFC: Always use an exclusive lock on the leaf vnode during an open() when > > shared lookups are enabled. This closes a few races including a race where > > concurrent opens of a fifo could result in different v_fifoinfo structures > > in different threads. > > Long term we should really look for a better solution to this problem. > There are a number of was to improve snapshots in ffs by fixing shared > locking. I don't disagree. The fifo case can be fixed easily enough in the fifo code by using fifo_mtx to protect v_fifoinfo perhaps (or doing an upgrade on the vnode lock?), but for the MFC I didn't want to have to fix each of the races with open(2). Probably better to fix it more properly in HEAD first. -- John Baldwin