This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] filename in tapset nfs.proc.open and nfs.proc.release
- From: David Smith <dsmith at redhat dot com>
- To: Lukas Berk <lberk at redhat dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, hai wu <haiwu dot us at gmail dot com>, systemtap at sourceware dot org
- Date: Wed, 17 Dec 2014 13:46:19 -0600
- Subject: Re: [PATCH] filename in tapset nfs.proc.open and nfs.proc.release
- Authentication-results: sourceware.org; auth=none
- References: <CAJ1=nZcYtxopEs-XGj-Cs89dfzA2LF8oScnc_b+JE1zysg1T=Q at mail dot gmail dot com> <548F3F8D dot 8000900 at redhat dot com> <y0m4mswhcu8 dot fsf at fche dot csb> <54919D17 dot 2020306 at redhat dot com> <548191293 dot 66310 dot 1418837792673 dot JavaMail dot zimbra at redhat dot com>
On 12/17/2014 11:36 AM, Lukas Berk wrote:
> It may be the case where, those looking to use the argstr convenience variable
> simply want to print out all the information being passed, regardless of
> the cost, already. In that case, finding they need to craft another, very
> similar script to get a piece of related information (without knowing why it
> wasn't passed in the first place) could be frustrating. I've always looked
> at argstr (rightly or wrongly) as 'just tell me everything being passed',
> knowing I could write a more tailored script later if needed.
In this case, we're not providing "everything being passed". In
nfs.proc.open, the probe provides:
- server_ip: IP address of server
- prot: transfer protocol
- version: NFS version (the function is used for all NFS version)
- filename: file name
- flag: file flag
- mode: file mode
Only filename, flag, and mode end up in argstr.
(Why was the probe written this way? I don't know, the tapset has been
around a long time.)
If our definition of argstr is "everything (of importance) being
*passed*", then we'd want the filename (which is passed), not the full
path (which isn't passed). The kernel rarely passes around full paths
internally, just a file pointer which contains the file name and a
pointer to the dentry (which points us to the parent directory). Also
note that task_dentry_path() can fail for various reasons, while getting
the file name from the file pointer should succeed most (if not all) of
the time.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)