mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
nfs: print fileid in lookup tracepoints
With this we can see the dentry -> inode linkage that's being revalidated. A fileid of 0 means "negative dentry". Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
310b1f89ea
commit
f6e70c59ed
@ -400,6 +400,7 @@ DECLARE_EVENT_CLASS(nfs_lookup_event,
|
||||
__field(unsigned long, flags)
|
||||
__field(dev_t, dev)
|
||||
__field(u64, dir)
|
||||
__field(u64, fileid)
|
||||
__string(name, dentry->d_name.name)
|
||||
),
|
||||
|
||||
@ -407,16 +408,18 @@ DECLARE_EVENT_CLASS(nfs_lookup_event,
|
||||
__entry->dev = dir->i_sb->s_dev;
|
||||
__entry->dir = NFS_FILEID(dir);
|
||||
__entry->flags = flags;
|
||||
__entry->fileid = d_is_negative(dentry) ? 0 : NFS_FILEID(d_inode(dentry));
|
||||
__assign_str(name, dentry->d_name.name);
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
|
||||
"flags=0x%lx (%s) name=%02x:%02x:%llu/%s fileid=%llu",
|
||||
__entry->flags,
|
||||
show_fs_lookup_flags(__entry->flags),
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
(unsigned long long)__entry->dir,
|
||||
__get_str(name)
|
||||
__get_str(name),
|
||||
__entry->fileid
|
||||
)
|
||||
);
|
||||
|
||||
@ -444,6 +447,7 @@ DECLARE_EVENT_CLASS(nfs_lookup_event_done,
|
||||
__field(unsigned long, flags)
|
||||
__field(dev_t, dev)
|
||||
__field(u64, dir)
|
||||
__field(u64, fileid)
|
||||
__string(name, dentry->d_name.name)
|
||||
),
|
||||
|
||||
@ -452,17 +456,19 @@ DECLARE_EVENT_CLASS(nfs_lookup_event_done,
|
||||
__entry->dir = NFS_FILEID(dir);
|
||||
__entry->error = error < 0 ? -error : 0;
|
||||
__entry->flags = flags;
|
||||
__entry->fileid = d_is_negative(dentry) ? 0 : NFS_FILEID(d_inode(dentry));
|
||||
__assign_str(name, dentry->d_name.name);
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s",
|
||||
"error=%ld (%s) flags=0x%lx (%s) name=%02x:%02x:%llu/%s fileid=%llu",
|
||||
-__entry->error, show_nfs_status(__entry->error),
|
||||
__entry->flags,
|
||||
show_fs_lookup_flags(__entry->flags),
|
||||
MAJOR(__entry->dev), MINOR(__entry->dev),
|
||||
(unsigned long long)__entry->dir,
|
||||
__get_str(name)
|
||||
__get_str(name),
|
||||
__entry->fileid
|
||||
)
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user