Date: Sat, 12 Jun 2010 11:59:03 +0300 From: Mikolaj Golub <to.my.trociny@gmail.com> To: Leon =?utf-8?Q?Me=C3=9Fner?= <l.messner@physik.tu-berlin.de> Cc: freebsd-stable@freebsd.org Subject: Re: freeBSD nullfs together with nfs and "silly rename" Message-ID: <86y6ekiq3s.fsf@kopusha.home.net> In-Reply-To: <8639wsk4t1.fsf@kopusha.home.net> (Mikolaj Golub's message of "Sat, 12 Jun 2010 11:56:10 %2B0300") References: <20100606144443.GA50876@emmi.physik-pool.tu-berlin.de> <8639wsk4t1.fsf@kopusha.home.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 12 Jun 2010 11:56:10 +0300 Mikolaj Golub wrote to Leon Me=C3=9Fner: MG> See the attached patch (it works for me on both 8-STABLE and CURRENT). Sorry, actually here is the patch. --=20 Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=null_vnops.c.null_remove.patch Index: sys/fs/nullfs/null_vnops.c =================================================================== --- sys/fs/nullfs/null_vnops.c (revision 208960) +++ sys/fs/nullfs/null_vnops.c (working copy) @@ -499,6 +499,23 @@ } /* + * Increasing refcount of lower vnode is needed at least for the case + * when lower FS is NFS to do sillyrename if the file is in use. + */ +static int +null_remove(struct vop_remove_args *ap) +{ + int retval; + struct vnode *lvp; + + lvp = NULLVPTOLOWERVP(ap->a_vp); + VREF(lvp); + retval = null_bypass(&ap->a_gen); + vrele(lvp); + return (retval); +} + +/* * We handle this to eliminate null FS to lower FS * file moving. Don't know why we don't allow this, * possibly we should. @@ -809,6 +826,7 @@ .vop_open = null_open, .vop_print = null_print, .vop_reclaim = null_reclaim, + .vop_remove = null_remove, .vop_rename = null_rename, .vop_setattr = null_setattr, .vop_strategy = VOP_EOPNOTSUPP, --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y6ekiq3s.fsf>