From owner-cvs-src-old@FreeBSD.ORG Sun Nov 2 10:16:29 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1420106567A for ; Sun, 2 Nov 2008 10:16:29 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BAEA58FC21 for ; Sun, 2 Nov 2008 10:16:29 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mA2AGTfc039628 for ; Sun, 2 Nov 2008 10:16:29 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mA2AGT5c039625 for cvs-src-old@freebsd.org; Sun, 2 Nov 2008 10:16:29 GMT (envelope-from attilio@repoman.freebsd.org) Message-Id: <200811021016.mA2AGT5c039625@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to attilio@repoman.freebsd.org using -f From: Attilio Rao Date: Sun, 2 Nov 2008 10:15:42 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/geom/journal g_journal.c src/sys/gnu/fs/ext2fs ext2_vfsops.c src/sys/kern vfs_lookup.c vfs_mount.c vfs_subr.c vfs_syscalls.c vfs_vnops.c src/sys/nfsclient nfs_socket.c nfs_vfsops.c src/sys/sys mount.h src/sys/ufs/ffs ffs_softdep.c ... X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2008 10:16:29 -0000 attilio 2008-11-02 10:15:42 UTC FreeBSD src repository Modified files: sys/geom/journal g_journal.c sys/gnu/fs/ext2fs ext2_vfsops.c sys/kern vfs_lookup.c vfs_mount.c vfs_subr.c vfs_syscalls.c vfs_vnops.c sys/nfsclient nfs_socket.c nfs_vfsops.c sys/sys mount.h sys/ufs/ffs ffs_softdep.c sys/ufs/ufs ufs_vfsops.c Log: SVN rev 184554 on 2008-11-02 10:15:42Z by attilio Improve VFS locking: - Implement real draining for vfs consumers by not relying on the mnt_lock and using instead a refcount in order to keep track of lock requesters. - Due to the change above, remove the mnt_lock lockmgr because it is now useless. - Due to the change above, vfs_busy() is no more linked to a lockmgr. Change so its KPI by removing the interlock argument and defining 2 new flags for it: MBF_NOWAIT which basically replaces the LK_NOWAIT of the old version (which was unlinked from the lockmgr alredy) and MBF_MNTLSTLOCK which provides the ability to drop the mountlist_mtx once the mnt interlock is held (ability still desired by most consumers). - The stub used into vfs_mount_destroy(), that allows to override the mnt_ref if running for more than 3 seconds, make it totally useless. Remove it as it was thought to work into older versions. If a problem of "refcount held never going away" should appear, we will need to fix properly instead than trust on such hackish solution. - Fix a bug where returning (with an error) from dounmount() was still leaving the MNTK_MWAIT flag on even if it the waiters were actually woken up. Just a place in vfs_mount_destroy() is left because it is going to recycle the structure in any case, so it doesn't matter. - Remove the markercnt refcount as it is useless. This patch modifies VFS ABI and breaks KPI for vfs_busy() so manpages and __FreeBSD_version will be modified accordingly. Discussed with: kib Tested by: pho Revision Changes Path 1.17 +1 -1 src/sys/geom/journal/g_journal.c 1.176 +1 -1 src/sys/gnu/fs/ext2fs/ext2_vfsops.c 1.114 +1 -1 src/sys/kern/vfs_lookup.c 1.294 +31 -32 src/sys/kern/vfs_mount.c 1.746 +25 -25 src/sys/kern/vfs_subr.c 1.462 +4 -4 src/sys/kern/vfs_syscalls.c 1.271 +17 -0 src/sys/kern/vfs_vnops.c 1.162 +2 -2 src/sys/nfsclient/nfs_socket.c 1.217 +1 -1 src/sys/nfsclient/nfs_vfsops.c 1.235 +10 -4 src/sys/sys/mount.h 1.230 +1 -1 src/sys/ufs/ffs/ffs_softdep.c 1.50 +1 -1 src/sys/ufs/ufs/ufs_vfsops.c