diff options
-rw-r--r-- | exports.stp | 2 | ||||
-rw-r--r-- | nfs_umount.stp | 8 | ||||
-rw-r--r-- | tapset/fs.stp | 14 |
3 files changed, 18 insertions, 6 deletions
diff --git a/exports.stp b/exports.stp index c2f47ed..ec73af8 100644 --- a/exports.stp +++ b/exports.stp @@ -70,6 +70,7 @@ probe module("sunrpc").function("cache_make_upcall").return if ($return) printf(" cache_make_upcall: %s\n", errno_str($return)); } +/* probe module("nfsd").function("check_nfsd_access") { check_exp = $exp; @@ -83,5 +84,6 @@ probe module("nfsd").function("check_nfsd_access").return check_rqstp_flavor, svc_export_flavors(check_exp)); } } +*/ probe begin { log("starting exports probe") } probe end { log("ending exports probe") } diff --git a/nfs_umount.stp b/nfs_umount.stp index 00a0459..e5f1164 100644 --- a/nfs_umount.stp +++ b/nfs_umount.stp @@ -6,6 +6,14 @@ probe kernel.function("sys_umount").return { printf("sys_umount: %d (%s)\n", $return, errno_str($return)); } +probe kernel.function("deactivate_super") +{ + printf("deactivate_super: sb %p\n", $s); +} +probe kernel.function("sys_umount").return +{ + printf("sys_umount: %d (%s)\n", $return, errno_str($return)); +} probe module("nfs").function("nfs_kill_super") { printf("nfs_kill_super: super %p\n", $s); diff --git a/tapset/fs.stp b/tapset/fs.stp index 246fb79..a6ba788 100644 --- a/tapset/fs.stp +++ b/tapset/fs.stp @@ -6,24 +6,26 @@ probe fs.read.return = kernel.function("vfs_read").return { probe fs.write.return = kernel.function("vfs_write").return { bytes = ($return > 0 ? $return : 0) } - function file2name:string(filep:long) %{ char *start = NULL, buf[MAXSTRINGLEN]; + struct file *file = (struct file *)(long) kread(&(THIS->filep)); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) struct dentry *dentry = NULL; struct vfsmount *mnt = NULL; - struct file *file = (struct file *)(long) kread(&(THIS->filep)); if (file) { -/* - mnt = (struct vfsmount *) kread(&(file->f_path.mnt)); - dentry = (struct dentry *) kread(&(file->f_path.dentry)); -*/ mnt = (struct vfsmount *) kread(&(file->f_vfsmnt)); dentry = (struct dentry *) kread(&(file->f_dentry)); } if (mnt && dentry) start = d_path(dentry, mnt, buf, MAXSTRINGLEN); +#else + struct path *path = NULL; + + if (file) + start = d_path(&(file->f_path), buf, MAXSTRINGLEN); +#endif if (start > 0) strlcpy(THIS->__retvalue, start, MAXSTRINGLEN); |