Don't thrash the name cache while trying to fill up the object cache.
(Make a new cache entry until desiredvnodes is reached).
This commit is contained in:
parent
8950c0148b
commit
dbd90d413f
@ -33,7 +33,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)vfs_cache.c 8.3 (Berkeley) 8/22/94
|
* @(#)vfs_cache.c 8.3 (Berkeley) 8/22/94
|
||||||
* $Id: vfs_cache.c,v 1.7 1995/03/08 01:40:44 phk Exp $
|
* $Id: vfs_cache.c,v 1.8 1995/03/09 20:23:45 phk Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -203,7 +203,7 @@ cache_enter(dvp, vp, cnp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numcache < numvnodes) {
|
if (numcache < numvnodes || numvnodes < desiredvnodes) {
|
||||||
/* Add one more entry */
|
/* Add one more entry */
|
||||||
ncp = (struct namecache *)
|
ncp = (struct namecache *)
|
||||||
malloc((u_long)sizeof *ncp, M_CACHE, M_WAITOK);
|
malloc((u_long)sizeof *ncp, M_CACHE, M_WAITOK);
|
||||||
|
Loading…
Reference in New Issue
Block a user