This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: NFSD tapset: how can I get filename from filehandles ?
>> I've tried a few things without success... such as:
>>
>>
>> filename = @cast($argp, "nfsd3_writeargs",
>> "kernel:nfsd")->fh->fh_dentry->d_name->name
>>
>>
>> which ended with a segfault.
> OK, I'm going to need some details here. First, what kernel are you
using?
I'm using Debian's 2.6.32.
> When you say a 'segfault', do you mean the stap executable segfaulted,
> or you got a kernel read fault, something like this:
>
> ---
> ERROR: kernel read fault at 0x0000000000000034 (addr) near identifier
> '@cast' at /usr/local/share/systemtap/tapset/dentry.stp:41:15
> ---
You're right ! They were read faults.
> I'll include the script in a sec, but that is systemtap protecting me
> from crashing my kernel. Instead of letting me read from that bogus
> address, systemtap errors out. This is a good thing.
Ok, It is not obvious to me, but right, that's far better than a kernel
oops :)
(I got one, experiencing the guru mode on that filename problem :p)