Date: Tue, 31 Aug 2010 01:16:45 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/fs/nullfs null_vnops.c Message-ID: <201008310117.o7V1H5mE079268@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008310117.o7V1H5mE079268>
