Date: Tue, 14 Nov 1995 09:56:07 -0800 From: David Greenman <davidg@Root.COM> To: Terry Lambert <terry@lambert.org> Cc: rashid@rk.ios.com, jgreco@brasil.moneng.mei.com, hackers@freebsd.org Subject: Re: Odd crash after inode depletion.. Message-ID: <199511141756.JAA00503@corbin.Root.COM> In-Reply-To: Your message of "Tue, 14 Nov 95 10:46:47 MST." <199511141746.KAA20340@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511141756.JAA00503>