This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 06/10] Updated nfsd.proc.remove probes
- From: Steve Dickson <SteveD at redhat dot com>
- To: Systemtap Mailing list <systemtap at sources dot redhat dot com>
- Date: Thu, 25 Feb 2010 17:24:49 -0500
- Subject: [PATCH 06/10] Updated nfsd.proc.remove probes
- References: <4B86F6E4.8020408@RedHat.com>
commit fcf7dae52ee72113082eb81c4b72b350b6408e00
Author: Steve Dickson <steved@redhat.com>
Date: Tue Feb 23 11:50:38 2010 -0500
Updated nfsd.proc.remove probes
Converted the nfsd.proc.remove probes to used
the @cast() mechanism.
Created the nfsd.proc4.remove probes
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
index 41263fb..9726de0 100644
--- a/tapset/nfsd.stp
+++ b/tapset/nfsd.stp
@@ -685,10 +685,12 @@ probe nfsd.proc4.write.create = kernel.function("nfsd4_create").return!,
* filelen : length of file name
*/
probe nfsd.proc.remove = nfsd.proc2.remove,
- nfsd.proc3.remove
+ nfsd.proc3.remove,
+ nfsd.proc4.remove
{}
probe nfsd.proc.remove.return = nfsd.proc2.remove.return,
- nfsd.proc3.remove.return
+ nfsd.proc3.remove.return,
+ nfsd.proc4.remove.return
{}
probe nfsd.proc2.remove = kernel.function("nfsd_proc_remove")!,
@@ -697,7 +699,7 @@ probe nfsd.proc2.remove = kernel.function("nfsd_proc_remove")!,
client_ip = addr_from_rqst($rqstp)
proto = $rqstp->rq_prot
version = 2
- fh = __get_fh($argp,10)
+ fh = & @cast($argp, "struct nfsd_diropargs", "kernel:nfsd")->fh
filelen = $argp->len
filename = kernel_string_n($argp->name, filelen)
@@ -711,7 +713,7 @@ probe nfsd.proc2.remove.return = kernel.function("nfsd_proc_remove").return!,
{
name = "nfsd.proc2.remove.return"
version = 2
- retstr = sprintf("%d",$return)
+ retstr = sprintf("%s", nfsderror($return))
}
probe nfsd.proc3.remove = kernel.function("nfsd3_proc_remove")!,
@@ -719,8 +721,8 @@ probe nfsd.proc3.remove = kernel.function("nfsd3_proc_remove")!,
{
client_ip = addr_from_rqst($rqstp)
proto = $rqstp->rq_prot
- version = 3
- fh = __get_fh($argp,11)
+ version = 3
+ fh = & @cast($argp, "struct nfsd3_diropargs", "kernel:nfsd")->fh
filelen = $argp->len
filename = kernel_string_n($argp->name, filelen)
@@ -734,9 +736,31 @@ probe nfsd.proc3.remove.return = kernel.function("nfsd3_proc_remove").return!,
{
name = "nfsd.proc3.remove.return"
version = 3
- retstr = sprintf("%d",$return)
+ retstr = sprintf("%s", nfsderror($return))
}
+probe nfsd.proc4.remove = kernel.function("nfsd4_remove") !,
+ module("nfsd").function("nfsd4_remove") ?
+{
+ client_ip = addr_from_rqst($rqstp)
+ proto = $rqstp->rq_prot
+ version = 4
+ fh = & @cast($cstate, "nfsd4_compound_state", "kernel:nfsd")->current_fh
+ filelen = $remove->rm_namelen
+ filename = kernel_string_n($remove->rm_name, filelen)
+
+ name = "nfsd.proc4.remove"
+ argstr = sprintf("%s", filename);
+
+}
+
+probe nfsd.proc4.remove.return = kernel.function("nfsd4_remove").return!,
+ module("nfsd").function("nfsd4_remove").return?
+{
+ name = "nfsd.proc4.remove.return"
+ version = 4
+ retstr = sprintf("%s", nfsderror($return))
+}
/*
* probe nfsd.proc.rename
* Fires when clients rename a file on server side