summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient/nfs_clsubs.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-06-18 23:02:53 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-06-18 23:02:53 +0000
commite68709579e3654df9d75d883f6676b64a5b49d1a (patch)
treeda2b6d6c4758b0a7df519b3e5dd66d5c3fe2dacf /sys/fs/nfsclient/nfs_clsubs.c
parent2c34fd40cf9b5ba7ec3d068fc410a06bc897665b (diff)
downloadFreeBSD-src-e68709579e3654df9d75d883f6676b64a5b49d1a.zip
FreeBSD-src-e68709579e3654df9d75d883f6676b64a5b49d1a.tar.gz
Add DTrace support to the new NFS client. This is essentially
cloned from the old NFS client, plus additions for NFSv4. A review of this code is in progress, however it was felt by the reviewer that it could go in now, before code slush. Any changes required by the review can be committed as bug fixes later.
Diffstat (limited to 'sys/fs/nfsclient/nfs_clsubs.c')
-rw-r--r--sys/fs/nfsclient/nfs_clsubs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clsubs.c b/sys/fs/nfsclient/nfs_clsubs.c
index 0c05631..214dfb7 100644
--- a/sys/fs/nfsclient/nfs_clsubs.c
+++ b/sys/fs/nfsclient/nfs_clsubs.c
@@ -35,6 +35,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_kdtrace.h"
+
/*
* These functions support the macros and help fiddle mbuf chains for
* the nfs op functions. They do things like create the rpc header and
@@ -68,6 +70,7 @@ __FBSDID("$FreeBSD$");
#include <fs/nfsclient/nfsnode.h>
#include <fs/nfsclient/nfsmount.h>
#include <fs/nfsclient/nfs.h>
+#include <fs/nfsclient/nfs_kdtrace.h>
#include <netinet/in.h>
@@ -238,6 +241,7 @@ ncl_getattrcache(struct vnode *vp, struct vattr *vaper)
#ifdef NFS_ACDEBUG
mtx_unlock(&Giant); /* ncl_printf() */
#endif
+ KDTRACE_NFS_ATTRCACHE_GET_MISS(vp);
return( ENOENT);
}
newnfsstats.attrcache_hits++;
@@ -267,6 +271,7 @@ ncl_getattrcache(struct vnode *vp, struct vattr *vaper)
#ifdef NFS_ACDEBUG
mtx_unlock(&Giant); /* ncl_printf() */
#endif
+ KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap);
return (0);
}
OpenPOWER on IntegriCloud