public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] filename in tapset nfs.proc.open and nfs.proc.release
@ 2014-12-14  4:35 hai wu
  2014-12-15 19:11 ` hai wu
  2014-12-15 20:07 ` David Smith
  0 siblings, 2 replies; 9+ messages in thread
From: hai wu @ 2014-12-14  4:35 UTC (permalink / raw)
  To: systemtap

tapset nfs.proc.open and nfs.proc.release in nfs_proc.stp only records
file's basename, which is not helpful when we use it to monitor NFS
file access activities.

The following patch would allow us to be able to see the full path for
NFS file, along with its NFS mount information.

diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp
index 1339aee..5a804e4 100644
--- a/tapset/linux/nfs_proc.stp
+++ b/tapset/linux/nfs_proc.stp
@@ -1658,7 +1658,7 @@ probe nfs.proc.open = kernel.function("nfs_open") !,
        prot = get_prot_from_client(client)
        version = __nfs_version($inode)

-       filename = __file_filename($filp)
+  filename = task_dentry_path(task_current(), $filp->f_dentry, $filp->f_vfsmnt)
        flag = $filp->f_flags
        mode = $filp->f_mode

@@ -1693,7 +1693,7 @@ probe nfs.proc.release = kernel.function("nfs_release") !,
        prot = get_prot_from_client(client)
        version = __nfs_version($inode)

-       filename = __file_filename($filp)
+  filename = task_dentry_path(task_current(), $filp->f_dentry, $filp->f_vfsmnt)
        flag = $filp->f_flags
        mode = $filp->f_mode

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-18  2:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-14  4:35 [PATCH] filename in tapset nfs.proc.open and nfs.proc.release hai wu
2014-12-15 19:11 ` hai wu
2014-12-15 20:07 ` David Smith
2014-12-15 20:34   ` Frank Ch. Eigler
2014-12-17 15:11     ` David Smith
2014-12-17 17:36       ` Lukas Berk
2014-12-17 19:46         ` David Smith
2014-12-18  0:07           ` Lukas Berk
2014-12-18  2:06             ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).