summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-10-13 14:28:14 -0400
committerSteve Dickson <steved@redhat.com>2011-10-13 14:28:14 -0400
commit1fab51bf18976626f580d99349eee1b6008c6a77 (patch)
tree22b20e8777d91d1d785baecd9e81a0a024a8da46
parent0b41083cd148017bbccc2568a0a633b057a80e7a (diff)
downloadsystemtap-1fab51bf18976626f580d99349eee1b6008c6a77.tar.gz
systemtap-1fab51bf18976626f580d99349eee1b6008c6a77.tar.xz
systemtap-1fab51bf18976626f580d99349eee1b6008c6a77.zip
Added more mount debugging routines
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--nfs/nfs_mount.stp59
-rw-r--r--tapset/fs.stp14
2 files changed, 69 insertions, 4 deletions
diff --git a/nfs/nfs_mount.stp b/nfs/nfs_mount.stp
index 940497a..6d6c37c 100644
--- a/nfs/nfs_mount.stp
+++ b/nfs/nfs_mount.stp
@@ -1,14 +1,61 @@
+probe kernel.function("do_add_mount_unlocked")
+{
+ printf("do_add_mount_unlocked: mnt_sb %p %s\n", $newmnt->mnt_sb, pathdump($path));
+}
+probe kernel.function("do_add_mount_unlocked").return
+{
+ if ($return < 0)
+ printf("do_add_mount_unlocked: ERROR %d (%s)\n", $return, errno_str($return));
+}
+probe kernel.function("do_new_mount").return
+{
+ if ($return < 0)
+ printf("do_new_mount: ERROR %d (%s)\n", $return, errno_str($return));
+}
+probe kernel.function("do_kern_mount").return
+{
+ if ($return < 0)
+ printf("do_kern_mount: ERROR %p (%s)\n", $return, errno_str($return));
+}
+probe kernel.function("security_sb_kern_mount").return
+{
+ if ($return < 0)
+ printf("security_sb_kern_mount: ERROR %d (%s)\n", $return, errno_str($return));
+}
+/*
+probe kernel.function("vfs_kern_mount")
+{
+ printf("vfs_kern_mount: type %p flags 0x%x name %s\n", $type, $flags, kernel_string($name));
+}
+probe kernel.function("vfs_kern_mount").return
+{
+ if ($return < 0)
+ printf("vfs_kern_mount: ERROR %p (%s)\n", $return, errno_str($return));
+}
+*/
probe module("nfs").function("nfs_get_sb")
{
- printf("nfs_mount: fs_name %s dev %s \n",
+ printf("nfs_get_sb: fs_name %s dev %s \n",
fs_name($fs_type), kernel_string($dev_name));
printf(" : flags=[%s]\n", nfs_mntflags($raw_data));
}
probe module("nfs").function("nfs_get_sb").return
{
- if ($return)
- printf("nfs_mount: ERROR %d (%s)\n", $return, errno_str($return));
+ if ($return < 0)
+ printf("nfs_get_sb: ERROR %d (%s)\n", $return, errno_str($return));
+}
+probe module("nfs").function("nfs4_get_sb")
+{
+ printf("nfs4_get_sb: fs_name %s dev %s \n",
+ fs_name($fs_type), kernel_string($dev_name));
+
+ printf(" : flags=[%s]\n", nfs_mntflags($raw_data));
+}
+probe module("nfs").function("nfs4_get_sb").return
+{
+ if ($return < 0)
+ printf("nfs4_get_sb: ERROR %d (%s)\n", $return, errno_str($return));
}
/*
probe module("nfs").function("nfs_validate_mount_data")
@@ -38,6 +85,10 @@ probe module("nfs").function("nfs_parse_devname").return
if ($return)
printf(" nfs_parse_devname: ERROR %d (%s)\n", $return, errno_str($return));
}
+probe module("nfs").function("nfs_compare_super").return
+{
+ printf(" nfs_compare_super: sp %p return %d\n", $sb, $return);
+}
/*
probe module("nfs").function("nfs_try_mount")
{
@@ -66,10 +117,10 @@ probe module("nfs").function("nfs_fill_super")
{
printf(" nfs_fill_super: sb %p data %p \n", $sb, $data);
}
-*/
probe module("nfs").function("nfs_initialise_sb")
{
printf(" nfs_initialise_sb: sb %p\n", $sb);
}
+*/
probe begin { log("starting nfs_mount probe") }
probe end { log("ending nfs_mount probe") }
diff --git a/tapset/fs.stp b/tapset/fs.stp
index 94c39ff..6f3fe9d 100644
--- a/tapset/fs.stp
+++ b/tapset/fs.stp
@@ -59,3 +59,17 @@ function file2ops:string(filep:long)
CATCH_DEREF_FAULT();
%}
+function pathdump:string(pathp:long)
+%{
+ struct path *path = (struct path *)(long) kread(&(THIS->pathp));
+ struct vfsmount *mnt=NULL;
+
+ if (path) {
+ mnt = (struct vfsmount *) kread(&(path->mnt));
+ }
+ if (mnt) {
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "pathdump: mnt_sb 0x%p mnt_root 0x%p dentry 0x%p",
+ mnt->mnt_sb, mnt->mnt_root, path->dentry);
+ }
+ CATCH_DEREF_FAULT();
+%}