diff options
-rw-r--r-- | tapset/ChangeLog | 6 | ||||
-rw-r--r-- | tapset/nfs.stp | 4 | ||||
-rw-r--r-- | tapset/nfs_proc.stp | 3 | ||||
-rw-r--r-- | tapset/rpc.stp | 8 |
4 files changed, 20 insertions, 1 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index 88f4985e..65abd7d5 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,9 @@ +2007-09-27 Wenji Huang <wenji.huang@oracle.com> + + * rpc.stp (clones_from_clnt, tasks_from_clnt): Fix for kernel >= 2.6.22. + * nfs.stp (__nfsi_ndirty) : Ditto. + * nfs_proc.stp (__nfsv4_bitmask) : Make bitmask valid according to CONFIG. + 2007-09-27 Zhaolei <zhaolei@cn.fujitsu.com> From Cai Fei <caifei@cn.fujitsu.com> diff --git a/tapset/nfs.stp b/tapset/nfs.stp index 61443581..87a2f4cc 100644 --- a/tapset/nfs.stp +++ b/tapset/nfs.stp @@ -60,7 +60,11 @@ function __nfsi_ndirty:long (inode:long) %{ /* pure */ THIS->__retvalue = -1; else { struct nfs_inode * nfsi = NFS_I(inode); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22) THIS->__retvalue = kread(&(nfsi->ndirty)); +#else + THIS->__retvalue = -1; +#endif } CATCH_DEREF_FAULT(); %} diff --git a/tapset/nfs_proc.stp b/tapset/nfs_proc.stp index f7129801..0b07fb54 100644 --- a/tapset/nfs_proc.stp +++ b/tapset/nfs_proc.stp @@ -124,8 +124,9 @@ function __nfsv4_bitmask :long(dir:long,i:long) %{ /* pure */ struct inode * dir = (struct inode *)(long)(THIS->dir); struct nfs_server * server = NFS_SERVER(dir); /* FIXME: deref hazard! */ +#ifdef CONFIG_NFS_V4 THIS->__retvalue = kread(&(server->attr_bitmask[i])); - +#endif CATCH_DEREF_FAULT(); %} diff --git a/tapset/rpc.stp b/tapset/rpc.stp index a5740a21..3d17d221 100644 --- a/tapset/rpc.stp +++ b/tapset/rpc.stp @@ -947,13 +947,21 @@ function port_from_clnt:long(clnt:long) function clones_from_clnt:long(clnt:long) %{ /* pure */ struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22) THIS->__retvalue = atomic_read(&clnt->cl_count); /* FIXME: deref hazard! */ +#else + THIS->__retvalue = -1; +#endif %} function tasks_from_clnt:long(clnt:long) %{ /* pure */ struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,22) THIS->__retvalue = atomic_read(&clnt->cl_users); /* FIXME: deref hazard! */ +#else + THIS->__retvalue = -1; +#endif %} function proc_from_msg:long(msg:long) |