Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 18:33:03 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        Tor.Egge@idi.ntnu.no (Tor Egge)
Cc:        roberto@keltia.freenix.fr, current@FreeBSD.ORG
Subject:   Re: nullfs & current UPDATE!
Message-ID:  <199710231833.LAA29634@usr02.primenet.com>
In-Reply-To: <199710221615.SAA17560@pat.idi.ntnu.no> from "Tor Egge" at Oct 22, 97 06:15:13 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > By using the following patch, I've been able to create and delete hundreds
> > of files in a nullfs mounted directory. No vnode leak as far as I can see
> > from the sysctl debug.numvnodes. fsck reports no missing blocks. No panic,
> > just works. Now that seems too easy :-)

[ ... ]

> > Opinions about this ?
> 
> Yes. 
> 
> This patch causes open files to be truncated to zero length if nullfs 
> is used to unlink the file.
> 
> e.g., when A and B are different shells:
> 
> 	A: mount -t null /tmp /mnt
> 	A. jot 1000000 1 > /tmp/test
> 	A: more /tmp/test 
> 	B: rm /mnt/test # while A: is still at top of file
> 	A: # Go to bottom of file.
> 
> then the last part of the file is lost. If B performes `rm /tmp/test'
> instead of `rm /mnt/test' then this problem does not occur.
> 
> This leads me to believe that this patch has some unwanted
> undocumented side effects due to calling VOP_INACTIVE without regard
> to lowervp->usecount.

I should have realized this as well; it's an obvious side effect of the
destruction of the alias reference before the destruction of the object.

I really think the idea of reference needs to be revisited.  For example,
I would like to see the name cache entry treated as a reference instance
as well.  To do both of these right requires some changes to the vnode
recycling code.  8-(.  It would be easier to do if vclean would just die...


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710231833.LAA29634>