vfs_cache.c (188833) | vfs_cache.c (189593) |
---|---|
1/*- 2 * Copyright (c) 1989, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Poul-Henning Kamp of the FreeBSD Project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1989, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Poul-Henning Kamp of the FreeBSD Project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 188833 2009-02-19 22:28:48Z jhb $"); | 36__FBSDID("$FreeBSD: head/sys/kern/vfs_cache.c 189593 2009-03-09 19:04:53Z jhb $"); |
37 38#include <sys/param.h> 39#include <sys/filedesc.h> 40#include <sys/fnv_hash.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/mount.h> --- 134 unchanged lines hidden (view full) --- 179 180static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); 181 182/* 183 * Flags in namecache.nc_flag 184 */ 185#define NCF_WHITE 1 186 | 37 38#include <sys/param.h> 39#include <sys/filedesc.h> 40#include <sys/fnv_hash.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/mount.h> --- 134 unchanged lines hidden (view full) --- 179 180static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); 181 182/* 183 * Flags in namecache.nc_flag 184 */ 185#define NCF_WHITE 1 186 |
187#ifdef DIAGNOSTIC |
|
187/* 188 * Grab an atomic snapshot of the name cache hash chain lengths 189 */ 190SYSCTL_NODE(_debug, OID_AUTO, hashstat, CTLFLAG_RW, NULL, "hash table stats"); 191 192static int 193sysctl_debug_hashstat_rawnchash(SYSCTL_HANDLER_ARGS) 194{ --- 68 unchanged lines hidden (view full) --- 263 error = SYSCTL_OUT(req, &pct, sizeof(pct)); 264 if (error) 265 return (error); 266 return (0); 267} 268SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| 269 CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", 270 "nchash chain lengths"); | 188/* 189 * Grab an atomic snapshot of the name cache hash chain lengths 190 */ 191SYSCTL_NODE(_debug, OID_AUTO, hashstat, CTLFLAG_RW, NULL, "hash table stats"); 192 193static int 194sysctl_debug_hashstat_rawnchash(SYSCTL_HANDLER_ARGS) 195{ --- 68 unchanged lines hidden (view full) --- 264 error = SYSCTL_OUT(req, &pct, sizeof(pct)); 265 if (error) 266 return (error); 267 return (0); 268} 269SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE_INT|CTLFLAG_RD| 270 CTLFLAG_MPSAFE, 0, 0, sysctl_debug_hashstat_nchash, "I", 271 "nchash chain lengths"); |
272#endif |
|
271 272/* 273 * cache_zap(): 274 * 275 * Removes a namecache entry from cache, whether it contains an actual 276 * pointer to a vnode or if it is just a negative cache entry. 277 */ 278static void --- 773 unchanged lines hidden --- | 273 274/* 275 * cache_zap(): 276 * 277 * Removes a namecache entry from cache, whether it contains an actual 278 * pointer to a vnode or if it is just a negative cache entry. 279 */ 280static void --- 773 unchanged lines hidden --- |