Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 1995 00:39:27 -0600 (CST)
From:      jbryant@server.iadfw.net
To:        bde@zeta.org.au (Bruce Evans)
Cc:        freebsd-hackers@FreeBSD.org, jbryant@news.iadfw.net
Subject:   Re: rename bug
Message-ID:  <199503130639.AAA13878@server.iadfw.net>
In-Reply-To: <199503130451.OAA21901@godzilla.zeta.org.au> from "Bruce Evans" at Mar 13, 95 02:51:17 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In reply:
> Date: Mon, 13 Mar 1995 14:51:17 +1000
> From: Bruce Evans <bde@zeta.org.au>
> To: freebsd-hackers@FreeBSD.org, jbryant@server.iadfw.net
> Subject: Re: rename bug
> 
> >> > The bug is when a rename(2) is called, the rename happens as per spec, 
> >> > except that the kernel isn't being updated as to the available space on 
> >> > the filesystem.  A reboot is needed to recognize the space is available.
> >> > 
> >> > For instance every time we add a user, our root filesystem APPEARS to 
> >> > have lost 1508k, this is caused when pwd_mkdb renames pwd.db.tmp to 
> >> > pwd.db, and spwd.db.tmp to spwd.db.
> 
> This is fixed in FreeBSD-current and wasn't in FreeBSD-2.0.
> 
> >> > I am confident that it is in the rename(2) system call.
> 
> Yes, it forgot to clear a reference held by the vm layer, so the old
> file didn't go away.
> 
> >> can you show me a script(1) of the bug occuring?
> 
> 	cd /tmp; >x; >y; mv x y; fsck -n ...
> 
> This only consumes one inode because `y' is empty.
> 
> At first I thought you were saying that there was a problem rebuilding
> the password database when the disk is full for other reasons.

I cannot currently get the kernel to link [autoconf.o and ioconf.o show 
unresolved references] using the -current sources.

I am currently using the 2.0-950210-SNAP.

Which source files should I grab for the fix?  I CAN compile the SNAP.

We really need a fix for this...  I am still looking for the rename(2)
source in 2.0-950210-SNAP...  It does not seem to exist in lib/libc/stdio 
where it belongs...  A grep of the entire source tree seems to only give 
me declarations, but not the sources [search term 'rename']...

Jim
-- 
All opinions expressed are mine, if you   | "I will not be pushed, stamped,
think otherwise, then go jump into turbid | briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!     | numbered!" - #1, "The Prisoner"
     jbryant@server.iadfw.net, System administrator, Internet America



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