Deleted Added
full compact
vfs_cache.c (260241) vfs_cache.c (262057)
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: stable/9/sys/kern/vfs_cache.c 260241 2014-01-03 20:02:59Z kib $");
36__FBSDID("$FreeBSD: stable/9/sys/kern/vfs_cache.c 262057 2014-02-17 13:58:50Z avg $");
37
38#include "opt_kdtrace.h"
39#include "opt_ktrace.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/filedesc.h>
44#include <sys/fnv_hash.h>

--- 12 unchanged lines hidden (view full) ---

57#include <sys/vnode.h>
58#ifdef KTRACE
59#include <sys/ktrace.h>
60#endif
61
62#include <vm/uma.h>
63
64SDT_PROVIDER_DECLARE(vfs);
37
38#include "opt_kdtrace.h"
39#include "opt_ktrace.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/filedesc.h>
44#include <sys/fnv_hash.h>

--- 12 unchanged lines hidden (view full) ---

57#include <sys/vnode.h>
58#ifdef KTRACE
59#include <sys/ktrace.h>
60#endif
61
62#include <vm/uma.h>
63
64SDT_PROVIDER_DECLARE(vfs);
65SDT_PROBE_DEFINE3(vfs, namecache, enter, done, done, "struct vnode *", "char *",
65SDT_PROBE_DEFINE3(vfs, namecache, enter, done, "struct vnode *", "char *",
66 "struct vnode *");
66 "struct vnode *");
67SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, done, "struct vnode *",
67SDT_PROBE_DEFINE2(vfs, namecache, enter_negative, done, "struct vnode *",
68 "char *");
68 "char *");
69SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, entry, "struct vnode *");
70SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, hit, "struct vnode *",
69SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, "struct vnode *");
70SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, "struct vnode *",
71 "char *", "struct vnode *");
71 "char *", "struct vnode *");
72SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, miss, "struct vnode *");
73SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, return, "int",
72SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, "struct vnode *");
73SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, "int",
74 "struct vnode *", "char *");
74 "struct vnode *", "char *");
75SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, hit, "struct vnode *", "char *",
75SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, "struct vnode *", "char *",
76 "struct vnode *");
76 "struct vnode *");
77SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit_negative, hit-negative,
77SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit__negative,
78 "struct vnode *", "char *");
78 "struct vnode *", "char *");
79SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, miss, "struct vnode *",
79SDT_PROBE_DEFINE2(vfs, namecache, lookup, miss, "struct vnode *",
80 "char *");
80 "char *");
81SDT_PROBE_DEFINE1(vfs, namecache, purge, done, done, "struct vnode *");
82SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, done, "struct vnode *");
83SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, done, "struct mount *");
84SDT_PROBE_DEFINE3(vfs, namecache, zap, done, done, "struct vnode *", "char *",
81SDT_PROBE_DEFINE1(vfs, namecache, purge, done, "struct vnode *");
82SDT_PROBE_DEFINE1(vfs, namecache, purge_negative, done, "struct vnode *");
83SDT_PROBE_DEFINE1(vfs, namecache, purgevfs, done, "struct mount *");
84SDT_PROBE_DEFINE3(vfs, namecache, zap, done, "struct vnode *", "char *",
85 "struct vnode *");
85 "struct vnode *");
86SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, done, "struct vnode *",
86SDT_PROBE_DEFINE2(vfs, namecache, zap_negative, done, "struct vnode *",
87 "char *");
88
89/*
90 * This structure describes the elements in the cache of recent
91 * names looked up by namei.
92 */
93
94struct namecache {

--- 514 unchanged lines hidden (view full) ---

609 * check to see if the entry is a whiteout; indicate this to
610 * the componentname, if so.
611 */
612 TAILQ_REMOVE(&ncneg, ncp, nc_dst);
613 TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
614 nchstats.ncs_neghits++;
615 if (ncp->nc_flag & NCF_WHITE)
616 cnp->cn_flags |= ISWHITEOUT;
87 "char *");
88
89/*
90 * This structure describes the elements in the cache of recent
91 * names looked up by namei.
92 */
93
94struct namecache {

--- 514 unchanged lines hidden (view full) ---

609 * check to see if the entry is a whiteout; indicate this to
610 * the componentname, if so.
611 */
612 TAILQ_REMOVE(&ncneg, ncp, nc_dst);
613 TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
614 nchstats.ncs_neghits++;
615 if (ncp->nc_flag & NCF_WHITE)
616 cnp->cn_flags |= ISWHITEOUT;
617 SDT_PROBE(vfs, namecache, lookup, hit_negative, dvp, nc_get_name(ncp),
617 SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp),
618 0, 0, 0);
619 cache_out_ts(ncp, tsp, ticksp);
620 CACHE_WUNLOCK();
621 return (ENOENT);
622
623wlock:
624 /*
625 * We need to update the cache after our lookup, so upgrade to

--- 908 unchanged lines hidden ---
618 0, 0, 0);
619 cache_out_ts(ncp, tsp, ticksp);
620 CACHE_WUNLOCK();
621 return (ENOENT);
622
623wlock:
624 /*
625 * We need to update the cache after our lookup, so upgrade to

--- 908 unchanged lines hidden ---