From owner-cvs-src@FreeBSD.ORG Fri Apr 11 09:48:12 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBBA11065670; Fri, 11 Apr 2008 09:48:12 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD0928FC31; Fri, 11 Apr 2008 09:48:12 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3B9mCmC091439; Fri, 11 Apr 2008 09:48:12 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3B9mCjB091438; Fri, 11 Apr 2008 09:48:12 GMT (envelope-from jeff) Message-Id: <200804110948.m3B9mCjB091438@repoman.freebsd.org> From: Jeff Roberson Date: Fri, 11 Apr 2008 09:48:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/ufs/ufs dirhash.h ufs_dirhash.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2008 09:48:13 -0000 jeff 2008-04-11 09:48:12 UTC FreeBSD src repository Modified files: sys/ufs/ufs dirhash.h ufs_dirhash.c Log: - Use a lockmgr lock rather than a mtx to protect dirhash. This lock may be held for the duration of the various dirhash operations which avoids many complex unlock/lock/revalidate sequences. - Permit shared locks on lookup. To protect the ip->i_dirhash pointer we use the vnode interlock in the shared case. Callers holding the exclusive vnode lock can run without fear of concurrent modification to i_dirhash. - Hold an exclusive dirhash lock when creating the dirhash structure for the first time or when re-creating a dirhash structure which has been recycled. Tested by: kris, pho Revision Changes Path 1.6 +2 -1 src/sys/ufs/ufs/dirhash.h 1.24 +289 -227 src/sys/ufs/ufs/ufs_dirhash.c