From: Steve Dickson <SteveD@redhat.com>
To: Linux NFSv4 mailing list <nfsv4@linux-nfs.org>,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: SystemTAP <systemtap@redhat.com>
Subject: [PATCH 3/5] NFS: Adding trace points to nfs/client.c
Date: Fri, 16 Jan 2009 11:30:09 -0500 [thread overview]
Message-ID: <4970B611.1040300@RedHat.com> (raw)
In-Reply-To: <4970B451.4080201@RedHat.com>
Added trace points to a number of client routines
used in the mount process. If a routine was only called
by the the mounting process, the prefix on the trace
point starts with 'trace_nfs_mount' otherwise the
routine name as used as the prefix.
Signed-off-by: Steve Dickson <steved@redhat.com>
--- linux/fs/nfs/client.c.orig 2009-01-14 15:54:19.000000000 -0500
+++ linux/fs/nfs/client.c 2009-01-15 12:40:08.000000000 -0500
@@ -37,6 +37,7 @@
#include <linux/in6.h>
#include <net/ipv6.h>
#include <linux/nfs_xdr.h>
+#include <trace/nfs.h>
#include <asm/system.h>
@@ -46,6 +47,19 @@
#include "iostat.h"
#include "internal.h"
+DEFINE_TRACE(nfs_create_rpc_client);
+DEFINE_TRACE(nfs_create_rpc_client_proto);
+DEFINE_TRACE(nfs_start_lockd);
+DEFINE_TRACE(nfs_init_server_rpcclient);
+DEFINE_TRACE(nfs_init_server_rpcclient_clone);
+DEFINE_TRACE(nfs_init_server_rpcclient_auth);
+DEFINE_TRACE(nfs_mount_init_clnt);
+DEFINE_TRACE(nfs_mount_init_srv);
+DEFINE_TRACE(nfs_probe_fsinfo);
+DEFINE_TRACE(nfs_probe_fsinfo_setcaps);
+DEFINE_TRACE(nfs_probe_fsinfo_fsinfo);
+DEFINE_TRACE(nfs_create_server);
+
#define NFSDBG_FACILITY NFSDBG_CLIENT
static DEFINE_SPINLOCK(nfs_client_lock);
@@ -507,6 +521,8 @@ static int nfs_create_rpc_client(struct
if (noresvport)
args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;
+ trace_nfs_create_rpc_client(clp, timeparms, flavor, args.flags);
+
if (!IS_ERR(clp->cl_rpcclient))
return 0;
@@ -514,6 +530,7 @@ static int nfs_create_rpc_client(struct
if (IS_ERR(clnt)) {
dprintk("%s: cannot create RPC client. Error = %ld\n",
__func__, PTR_ERR(clnt));
+ trace_nfs_create_rpc_client_proto(clp, PTR_ERR(clnt));
return PTR_ERR(clnt);
}
@@ -554,9 +571,10 @@ static int nfs_start_lockd(struct nfs_se
return 0;
host = nlmclnt_init(&nlm_init);
- if (IS_ERR(host))
+ if (IS_ERR(host)) {
+ trace_nfs_start_lockd(server, PTR_ERR(host));
return PTR_ERR(host);
-
+ }
server->nlm_host = host;
server->destroy = nfs_destroy_server;
return 0;
@@ -601,9 +619,12 @@ static int nfs_init_server_rpcclient(str
{
struct nfs_client *clp = server->nfs_client;
+ trace_nfs_init_server_rpcclient(server, timeo, pseudoflavour);
+
server->client = rpc_clone_client(clp->cl_rpcclient);
if (IS_ERR(server->client)) {
dprintk("%s: couldn't create rpc_client!\n", __func__);
+ trace_nfs_init_server_rpcclient_clone(server, PTR_ERR(server->client));
return PTR_ERR(server->client);
}
@@ -618,6 +639,7 @@ static int nfs_init_server_rpcclient(str
auth = rpcauth_create(pseudoflavour, server->client);
if (IS_ERR(auth)) {
dprintk("%s: couldn't create credcache!\n", __func__);
+ trace_nfs_init_server_rpcclient_auth(server, PTR_ERR(auth));
return PTR_ERR(auth);
}
}
@@ -657,6 +679,7 @@ static int nfs_init_client(struct nfs_cl
error:
nfs_mark_client_ready(clp, error);
dprintk("<-- nfs_init_client() = xerror %d\n", error);
+ trace_nfs_mount_init_clnt(clp, error);
return error;
}
@@ -688,6 +711,7 @@ static int nfs_init_server(struct nfs_se
clp = nfs_get_client(&cl_init);
if (IS_ERR(clp)) {
dprintk("<-- nfs_init_server() = error %ld\n", PTR_ERR(clp));
+ trace_nfs_mount_init_srv(server, PTR_ERR(clp));
return PTR_ERR(clp);
}
@@ -807,19 +831,23 @@ static int nfs_probe_fsinfo(struct nfs_s
int error;
dprintk("--> nfs_probe_fsinfo()\n");
+ trace_nfs_probe_fsinfo(server, mntfh, fattr);
if (clp->rpc_ops->set_capabilities != NULL) {
error = clp->rpc_ops->set_capabilities(server, mntfh);
- if (error < 0)
+ if (error < 0) {
+ trace_nfs_probe_fsinfo_setcaps(server, error);
goto out_error;
+ }
}
fsinfo.fattr = fattr;
nfs_fattr_init(fattr);
error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
- if (error < 0)
+ if (error < 0) {
+ trace_nfs_probe_fsinfo_fsinfo(server, error);
goto out_error;
-
+ }
nfs_server_set_fsinfo(server, &fsinfo);
error = bdi_init(&server->backing_dev_info);
if (error)
@@ -956,6 +984,7 @@ struct nfs_server *nfs_create_server(con
if (!(fattr.valid & NFS_ATTR_FATTR)) {
error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr);
if (error < 0) {
+ trace_nfs_create_server(server, mntfh, error);
dprintk("nfs_create_server: getattr error = %d\n", -error);
goto error;
}
next prev parent reply other threads:[~2009-01-16 16:30 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 16:22 [RFC][PATCH 0/5] NFS: trace points added to mounting path Steve Dickson
[not found] ` <4970B451.4080201-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-16 16:25 ` [PATCH 1/5] NFS: Adding trace points to fs/nfs/getroot.c Steve Dickson
2009-01-16 16:28 ` [PATCH 2/5] NFS: Adding trace points to fs/nfs/super.c Steve Dickson
2009-01-16 18:52 ` [RFC][PATCH 0/5] NFS: trace points added to mounting path Chuck Lever
2009-01-21 17:13 ` Steve Dickson
[not found] ` <497757D1.7090908-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-21 18:01 ` Chuck Lever
2009-01-21 19:29 ` Trond Myklebust
2009-01-21 19:58 ` Steve Dickson
2009-01-21 20:23 ` Trond Myklebust
2009-01-22 13:07 ` Steve Dickson
[not found] ` <49786F9F.7030400-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-22 15:30 ` Trond Myklebust
2009-01-22 15:49 ` Steve Dickson
2009-01-22 17:47 ` Arnaldo Carvalho de Melo
2009-01-21 19:37 ` Steve Dickson
2009-01-21 20:19 ` Chuck Lever
2009-01-21 22:36 ` Greg Banks
[not found] ` <4977A385.8000406-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-21 22:47 ` Arnaldo Carvalho de Melo
2009-01-21 22:57 ` Trond Myklebust
2009-01-21 23:06 ` Arnaldo Carvalho de Melo
2009-01-21 22:56 ` Trond Myklebust
2009-01-21 23:11 ` Greg Banks
2009-01-21 23:47 ` Trond Myklebust
2009-01-22 0:53 ` Frank Ch. Eigler
2009-01-22 2:04 ` Greg Banks
[not found] ` <4977D431.1020906-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-22 15:27 ` Steve Dickson
[not found] ` <49789073.1080200-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-22 22:43 ` Greg Banks
2009-01-21 22:56 ` J. Bruce Fields
2009-01-21 23:05 ` Muntz, Daniel
2009-01-22 15:59 ` Steve Dickson
2009-01-22 16:45 ` J. Bruce Fields
2009-01-22 22:54 ` Greg Banks
[not found] ` <4978F91C.4090208-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-23 18:09 ` J. Bruce Fields
2009-01-23 22:18 ` Greg Banks
2009-01-23 18:17 ` Chuck Lever
2009-01-22 13:55 ` Steve Dickson
2009-01-22 22:31 ` Greg Banks
2009-01-21 21:26 ` Greg Banks
2009-01-22 15:19 ` Steve Dickson
2009-01-23 18:28 ` Chuck Lever
2009-01-23 22:21 ` Greg Banks
2009-01-16 23:44 ` Greg Banks
[not found] ` <49711BDF.3010605-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-17 16:15 ` Frank Ch. Eigler
[not found] ` <4972A8F5.7070806@opengridcomputing.com>
2009-01-18 17:47 ` Frank Ch. Eigler
[not found] ` <y0mmydpucww.fsf-vo4H8ooykKW2oG+2xah3EoGKTjYczspe@public.gmane.org>
2009-01-18 23:12 ` Greg Banks
[not found] ` <4973B777.2000102-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-19 15:41 ` Frank Ch. Eigler
2009-01-19 23:13 ` Greg Banks
2009-01-19 14:27 ` Jeff Moyer
[not found] ` <x49ab9ntlpp.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2009-01-19 19:49 ` Jason Baron
2009-01-19 22:58 ` Greg Banks
2009-01-21 10:13 ` K.Prasad
2009-01-21 16:39 ` Steve Dickson
[not found] ` <49774FDC.5090307-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-21 17:04 ` Arnaldo Carvalho de Melo
2009-01-21 19:59 ` Steve Dickson
[not found] ` <20090121170401.GD4394-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-01-21 20:39 ` Christoph Hellwig
2009-01-18 16:40 ` Christoph Hellwig
2009-01-16 16:30 ` Steve Dickson [this message]
2009-01-16 16:32 ` [PATCH 4/5] NFS: Convert trace points to trace markers Steve Dickson
2009-01-16 16:33 ` [PATCH 5/5] NFS: Systemtap script Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4970B611.1040300@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=systemtap@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.