Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1fd1085b
Commit
1fd1085b
authored
Aug 21, 2013
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: Add tracepoints for debugging NFS hard links
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
70ded201
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
0 deletions
+72
-0
fs/nfs/dir.c
fs/nfs/dir.c
+2
-0
fs/nfs/nfstrace.h
fs/nfs/nfstrace.h
+70
-0
No files found.
fs/nfs/dir.c
View file @
1fd1085b
...
...
@@ -1860,6 +1860,7 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
old_dentry
->
d_parent
->
d_name
.
name
,
old_dentry
->
d_name
.
name
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
trace_nfs_link_enter
(
inode
,
dir
,
dentry
);
NFS_PROTO
(
inode
)
->
return_delegation
(
inode
);
d_drop
(
dentry
);
...
...
@@ -1868,6 +1869,7 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
ihold
(
inode
);
d_add
(
dentry
,
inode
);
}
trace_nfs_link_exit
(
inode
,
dir
,
dentry
,
error
);
return
error
;
}
EXPORT_SYMBOL_GPL
(
nfs_link
);
...
...
fs/nfs/nfstrace.h
View file @
1fd1085b
...
...
@@ -512,6 +512,76 @@ DEFINE_NFS_DIRECTORY_EVENT_DONE(nfs_unlink_exit);
DEFINE_NFS_DIRECTORY_EVENT
(
nfs_symlink_enter
);
DEFINE_NFS_DIRECTORY_EVENT_DONE
(
nfs_symlink_exit
);
TRACE_EVENT
(
nfs_link_enter
,
TP_PROTO
(
const
struct
inode
*
inode
,
const
struct
inode
*
dir
,
const
struct
dentry
*
dentry
),
TP_ARGS
(
inode
,
dir
,
dentry
),
TP_STRUCT__entry
(
__field
(
dev_t
,
dev
)
__field
(
u64
,
fileid
)
__field
(
u64
,
dir
)
__string
(
name
,
dentry
->
d_name
.
name
)
),
TP_fast_assign
(
__entry
->
dev
=
inode
->
i_sb
->
s_dev
;
__entry
->
fileid
=
NFS_FILEID
(
inode
);
__entry
->
dir
=
NFS_FILEID
(
dir
);
__assign_str
(
name
,
dentry
->
d_name
.
name
);
),
TP_printk
(
"fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s"
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
__entry
->
fileid
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
(
unsigned
long
long
)
__entry
->
dir
,
__get_str
(
name
)
)
);
TRACE_EVENT
(
nfs_link_exit
,
TP_PROTO
(
const
struct
inode
*
inode
,
const
struct
inode
*
dir
,
const
struct
dentry
*
dentry
,
int
error
),
TP_ARGS
(
inode
,
dir
,
dentry
,
error
),
TP_STRUCT__entry
(
__field
(
int
,
error
)
__field
(
dev_t
,
dev
)
__field
(
u64
,
fileid
)
__field
(
u64
,
dir
)
__string
(
name
,
dentry
->
d_name
.
name
)
),
TP_fast_assign
(
__entry
->
dev
=
inode
->
i_sb
->
s_dev
;
__entry
->
fileid
=
NFS_FILEID
(
inode
);
__entry
->
dir
=
NFS_FILEID
(
dir
);
__entry
->
error
=
error
;
__assign_str
(
name
,
dentry
->
d_name
.
name
);
),
TP_printk
(
"error=%d fileid=%02x:%02x:%llu name=%02x:%02x:%llu/%s"
,
__entry
->
error
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
__entry
->
fileid
,
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
(
unsigned
long
long
)
__entry
->
dir
,
__get_str
(
name
)
)
);
DECLARE_EVENT_CLASS
(
nfs_rename_event
,
TP_PROTO
(
const
struct
inode
*
old_dir
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment