summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorzhaolei <zhaolei>2007-10-11 05:29:08 +0000
committerzhaolei <zhaolei>2007-10-11 05:29:08 +0000
commit6ff8c5cc81c6a7a843c20061e9a9b50d5b0a051f (patch)
tree67d8255527a9332e379848209d760004911d85d8 /tapset
parentb9b39a6bd1d14d1c2b3bd6965e09b6a0ab89d29e (diff)
downloadsystemtap-steved-6ff8c5cc81c6a7a843c20061e9a9b50d5b0a051f.tar.gz
systemtap-steved-6ff8c5cc81c6a7a843c20061e9a9b50d5b0a051f.tar.xz
systemtap-steved-6ff8c5cc81c6a7a843c20061e9a9b50d5b0a051f.zip
2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com>
From Cai Fei <caifei@cn.fujitsu.com> * nfs_proc.stp (__nfs_write_data_info): Add data-access code for count, valid and timestamp.
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog6
-rw-r--r--tapset/nfs_proc.stp20
2 files changed, 26 insertions, 0 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index c5efccc3..4058ea04 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,5 +1,11 @@
2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com>
+ From Cai Fei <caifei@cn.fujitsu.com>
+ * nfs_proc.stp (__nfs_write_data_info): Add data-access code for
+ count, valid and timestamp.
+
+2007-10-11 Zhaolei <zhaolei@cn.fujitsu.com>
+
* udp.stp: Add name argument for all probes.
2007-10-10 Martin Hunt <hunt@redhat.com>
diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp
index 0b07fb54..bd7baa80 100644
--- a/tapset/nfs_proc.stp
+++ b/tapset/nfs_proc.stp
@@ -101,10 +101,14 @@ function __nfs_read_data_info:long (rdata :long,index :long) %{ /* pure */
/*
0: get ip address
1: get proto
+ 2: get res->count
+ 3: get res->fattr->valid
+ 4: get timestamp
*/
function __nfs_write_data_info:long (wdata :long,index :long) %{ /* pure */
struct nfs_write_data * wdata = (struct nfs_write_data *)(long)THIS->wdata;
struct rpc_task *task = &(wdata->task);
+ struct nfs_writeres *wres = &(wdata->res);
int index = THIS->index;
switch(index) {
@@ -114,9 +118,25 @@ function __nfs_write_data_info:long (wdata :long,index :long) %{ /* pure */
case 1:
THIS->__retvalue = get_prot(task);
break;
+
+ case 2:
+ THIS->__retvalue = kread(&(wres->count));
+ break;
+ case 3: {
+ struct nfs_fattr *fattr = kread(&(wres->fattr));
+ THIS->__retvalue = kread(&(fattr->valid));
+ break;
+ }
+#ifdef CONFIG_NFS_V4
+ case 4:
+ THIS->__retvalue = kread(&(wdata->timestamp));
+ break;
+#endif
default:
+ THIS->__retvalue = 0;
break;
}
+ CATCH_DEREF_FAULT();
%}
function __nfsv4_bitmask :long(dir:long,i:long) %{ /* pure */