DragonFly BSD
DragonFly bugs List (threaded) for 2004-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Re2: file weirdness / vnlru process issues


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Oct 2004 11:11:06 -0700 (PDT)

:Woop, maybe not perfect yet.  During another 'make realquickrel', I got
:a panic (although it completed successfully a few times previously - but
:this one was to a different destination):
:
:panic: assertion: ncp != NULL in cache_cleanneg
:
:I gather that's related to the same bit of code as before, i.e. cleaning
:out negative hits.
:
:-Chris

    This is my fault.  I copied the assertion from the old code to
    the new code and it is simply not correct any more in the new
    code.  NULL is actually allowed there, but we have to break out
    of the loop if we get one.

    Here's the patch, please test.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>

Index: kern/vfs_cache.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_cache.c,v
retrieving revision 1.39
diff -u -r1.39 vfs_cache.c
--- kern/vfs_cache.c	19 Oct 2004 05:55:34 -0000	1.39
+++ kern/vfs_cache.c	20 Oct 2004 18:10:26 -0000
@@ -1439,7 +1439,10 @@
 	 */
 	while (count) {
 		ncp = TAILQ_FIRST(&ncneglist);
-		KKASSERT(ncp != NULL);
+		if (ncp == NULL) {
+			KKASSERT(numneg == 0);
+			break;
+		}
 		TAILQ_REMOVE(&ncneglist, ncp, nc_vnode);
 		TAILQ_INSERT_TAIL(&ncneglist, ncp, nc_vnode);
 		if (cache_get_nonblock(ncp) == 0)



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]