From owner-freebsd-hackers Tue Nov 14 09:57:48 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA27184 for hackers-outgoing; Tue, 14 Nov 1995 09:57:48 -0800 Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id JAA27155 for ; Tue, 14 Nov 1995 09:57:36 -0800 Received: from corbin.Root.COM (corbin [198.145.90.50]) by Root.COM (8.6.12/8.6.5) with ESMTP id JAA28903; Tue, 14 Nov 1995 09:57:26 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.12/8.6.5) with SMTP id JAA00503; Tue, 14 Nov 1995 09:56:07 -0800 Message-Id: <199511141756.JAA00503@corbin.Root.COM> To: Terry Lambert cc: rashid@rk.ios.com, jgreco@brasil.moneng.mei.com, hackers@freebsd.org Subject: Re: Odd crash after inode depletion.. In-reply-to: Your message of "Tue, 14 Nov 95 10:46:47 MST." <199511141746.KAA20340@phaeton.artisoft.com> From: David Greenman Reply-To: davidg@Root.COM Date: Tue, 14 Nov 1995 09:56:07 -0800 Sender: owner-hackers@freebsd.org Precedence: bulk >> Do you know the difference of appearance of a cicular queue in our sources? >> Based on your comments, I must conclude that you do not. tailq's are NOT >> circular queues. The vnode free list is NOT a circular queue and it never has >> been in FreeBSD. > >First of all, I correctly identified the code that was screwing up from >a written description of the problem. I wrote the part about the circular >queues before going to the code (I was going to not attempt a cursor fix >precisely because it doesn't matter what I post, I get attacked). No you did not identify the problem. vnodes on the free list are not supposed to *ever* have non-zero usecounts. Something gained a reference to the vnode without pulling it off the freelist. THAT is the problem. >Second, it was a change to the queue management that cause the screwup, >since even you must admit that it didn't happen in the past, and the >change was to add more vnodes, and the failure mode was in the queue >head check that guards the allocation code. We did !!!NOT!!! change the queue management for vnodes! How many times do I have to say this? >Third, I identified two potential quick hack fixes. Which are wrong. You don't understand the problem or the code. >> The change to a circular queue for the mountlist was NOT made for aesthetic >> reasons. It was made because it is required to traverse the mount queue in the >> reverse direction in order to properly dismount filesystems (because of mount >> point dependencies). > >This is why god invented the stack and function recursion. It's called a >depth first traversal. I had considered doing the mount insertion at the head. "df" then comes out backwards. circleq's are the correct solution. -DG