diff options
author | Steve Dickson <steved@redhat.com> | 2014-02-10 13:05:58 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2014-02-10 13:05:58 -0500 |
commit | 7d1e51313fd00e6146082190746e5988a0d28719 (patch) | |
tree | 5f5df0d6290bf7217f42788872f831e28c92df23 /tapset | |
parent | 330857f790fe94b38001367a4cf6e376f72d656e (diff) | |
download | systemtap-7d1e51313fd00e6146082190746e5988a0d28719.tar.gz systemtap-7d1e51313fd00e6146082190746e5988a0d28719.tar.xz systemtap-7d1e51313fd00e6146082190746e5988a0d28719.zip |
Update some old code....
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/nfsd4_secinfo.stp | 2 | ||||
-rw-r--r-- | tapset/nfsd_fh.stp | 23 | ||||
-rw-r--r-- | tapset/svc_export.stp | 22 |
3 files changed, 37 insertions, 10 deletions
diff --git a/tapset/nfsd4_secinfo.stp b/tapset/nfsd4_secinfo.stp index d9c0446..9de5b20 100644 --- a/tapset/nfsd4_secinfo.stp +++ b/tapset/nfsd4_secinfo.stp @@ -7,10 +7,12 @@ */ #include <linux/nfsd/export.h> #include <linux/nfsd/nfsfh.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) #include <linux/nfsd/state.h> #include <linux/nfsd/xdr4.h> #endif +#endif %} function nfsd4_secinfo_namelen:long (secinfo:long ) { diff --git a/tapset/nfsd_fh.stp b/tapset/nfsd_fh.stp index 8ea5d0e..0b13736 100644 --- a/tapset/nfsd_fh.stp +++ b/tapset/nfsd_fh.stp @@ -3,12 +3,27 @@ #include <linux/sunrpc/svc.h> #include <linux/nfsd/nfsfh.h> #include <linux/nfsd/export.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) #include <linux/nfsd/state.h> #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) #include <linux/nfsd/xdr4.h> #endif #endif +#else +struct nfsd4_compound_state { + struct svc_fh current_fh; + struct svc_fh save_fh; + struct nfs4_stateowner *replay_owner; + /* For sessions DRC */ + struct nfsd4_session *session; + struct nfsd4_slot *slot; + __be32 *datap; + size_t iovlen; + u32 minorversion; + u32 status; +}; +#endif %} @@ -17,7 +32,7 @@ function svcfhfmt:string(svcfh:long) struct svc_fh *fhp = (struct svc_fh *)(long) kread(&(THIS->svcfh)); struct knfsd_fh *fh = &fhp->fh_handle; struct dentry *dentry; - char buf[MAXSTRINGLEN], *filename; + char buf[64], *filename; int cc=0; sprintf(buf+cc, "fh_version %d fh_fsid_type %d ", @@ -42,7 +57,7 @@ function svcfhfmt:string(svcfh:long) fh->fh_base.fh_pad[5]); cc = strlen(buf); - snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + snprintf(THIS->__retvalue, 64, "%s", buf); CATCH_DEREF_FAULT(); %} @@ -52,7 +67,7 @@ function cstate_pr:string(cptr:long) (struct nfsd4_compound_state *)(long) kread(&(THIS->cptr)); struct svc_fh *fhp = (struct svc_fh *)&cstate->current_fh; struct knfsd_fh *fh = &fhp->fh_handle; - char buf[MAXSTRINGLEN]; + char buf[64]; int cc=0; sprintf(buf+cc, "fh_dentry %p, fh_version %d fh_auth_type %d fh_fsid_type %d\n", @@ -68,7 +83,7 @@ function cstate_pr:string(cptr:long) fh->fh_base.fh_pad[4], fh->fh_base.fh_pad[5]); cc = strlen(buf); - snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + snprintf(THIS->__retvalue, 64, "%s", buf); CATCH_DEREF_FAULT(); %} diff --git a/tapset/svc_export.stp b/tapset/svc_export.stp index f67f6e0..c0dbf9b 100644 --- a/tapset/svc_export.stp +++ b/tapset/svc_export.stp @@ -14,7 +14,7 @@ function svc_export_dump:string(_exp:long) struct svc_export *exp = (struct svc_export *)(long) kread(&(THIS->_exp)); struct dentry *dentry = NULL; struct vfsmount *mnt = NULL; - char buf[MAXSTRINGLEN], *fname=NULL; + char buf[64], *fname=NULL; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) struct path ex_path; #endif @@ -31,23 +31,33 @@ function svc_export_dump:string(_exp:long) dentry = (struct dentry *) (long) kread(&(exp->ex_dentry)); mnt = (struct vfsmount *) kread(&(exp->ex_mnt)); if (mnt && dentry) - fname = d_path(dentry, mnt, buf, MAXSTRINGLEN); + fname = d_path(dentry, mnt, buf, 64); sprintf(buf+cc, " mnt %p dentry %p(%s)", exp->ex_mnt, exp->ex_dentry, fname > 0 ? fname : NULL); #else +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) sprintf(buf+cc, "exp %p path %s flg 0x%x fsid %d nflavors %d\n", exp, exp->ex_pathname > 0 ? exp->ex_pathname : NULL, exp->ex_flags, exp->ex_fsid, exp->ex_nflavors); +#else + dentry = (struct dentry *) (long) kread(&(exp->ex_path.dentry)); + mnt = (struct vfsmount *) kread(&(exp->ex_path.mnt)); + if (mnt && dentry) + fname = d_path(&exp->ex_path, buf, 64); + sprintf(buf+cc, "exp %p mnt %p dentry %p(%s) flg 0x%x fsid %d nflavors %d\n", + exp, mnt, dentry, fname > 0 ? fname : NULL, + exp->ex_flags, exp->ex_fsid, exp->ex_nflavors); +#endif cc = strlen(buf); ex_path.dentry = (struct dentry *) (long) kread(&(exp->ex_path.dentry)); ex_path.mnt = (struct vfsmount *) kread(&(exp->ex_path.mnt)); if (ex_path.mnt && ex_path.dentry) - fname = d_path(&ex_path, buf, MAXSTRINGLEN); + fname = d_path(&ex_path, buf, 64); sprintf(buf+cc, " mnt %p dentry %p(%s)", ex_path.mnt, ex_path.dentry, fname > 0 ? fname : NULL); #endif } - snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + snprintf(THIS->__retvalue, 64, "%s", buf); CATCH_DEREF_FAULT(); %} @@ -57,7 +67,7 @@ function svc_export_flavors:string(_exp:long) struct svc_export *exp = (struct svc_export *)(long) kread(&(THIS->_exp)); struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; struct exp_flavor_info *f; - char buf[MAXSTRINGLEN], *fname=NULL; + char buf[64], *fname=NULL; int cc=0; if (exp <= 0) { @@ -76,7 +86,7 @@ function svc_export_flavors:string(_exp:long) cc = strlen(buf); } } - snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf); + snprintf(THIS->__retvalue, 64, "%s", buf); CATCH_DEREF_FAULT(); %} |