From owner-cvs-src-old@FreeBSD.ORG Tue Aug 31 01:17:05 2010 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 A44A910656A3 for ; Tue, 31 Aug 2010 01:17:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 92AC58FC14 for ; Tue, 31 Aug 2010 01:17:05 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o7V1H5Sl079269 for ; Tue, 31 Aug 2010 01:17:05 GMT (envelope-from rmacklem@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o7V1H5mE079268 for cvs-src-old@freebsd.org; Tue, 31 Aug 2010 01:17:05 GMT (envelope-from rmacklem@repoman.freebsd.org) Message-Id: <201008310117.o7V1H5mE079268@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rmacklem@repoman.freebsd.org using -f From: Rick Macklem Date: Tue, 31 Aug 2010 01:16:45 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/nullfs null_vnops.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: Tue, 31 Aug 2010 01:17:05 -0000 rmacklem 2010-08-31 01:16:45 UTC FreeBSD src repository Modified files: sys/fs/nullfs null_vnops.c Log: SVN rev 212043 on 2010-08-31 01:16:45Z by rmacklem Add a null_remove() function to nullfs, so that the v_usecount of the lower level vnode is incremented to greater than 1 when the upper level vnode's v_usecount is greater than one. This is necessary for the NFS clients, so that they will do a silly rename of the file instead of actually removing it when the file is still in use. It is "racy", since the v_usecount is incremented in many places in the kernel with minimal synchronization, but an extraneous silly rename is preferred to not doing a silly rename when it is required. The only other file systems that currently check the value of v_usecount in their VOP_REMOVE() functions are nwfs and smbfs. These file systems choose to fail a remove when the v_usecount is greater than 1 and I believe will function more correctly with this patch, as well. Tested by: to.my.trociny at gmail.com Submitted by: to.my.trociny at gmail.com (earlier version) Reviewed by: kib MFC after: 2 weeks Revision Changes Path 1.113 +27 -0 src/sys/fs/nullfs/null_vnops.c