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
b5f875a9
Commit
b5f875a9
authored
Aug 13, 2013
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Add tracepoints for debugging getattr
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
1f2d30b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
2 deletions
+74
-2
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+5
-2
fs/nfs/nfs4trace.h
fs/nfs/nfs4trace.h
+69
-0
No files found.
fs/nfs/nfs4proc.c
View file @
b5f875a9
...
@@ -2697,6 +2697,7 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
...
@@ -2697,6 +2697,7 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
int
err
;
int
err
;
do
{
do
{
err
=
_nfs4_lookup_root
(
server
,
fhandle
,
info
);
err
=
_nfs4_lookup_root
(
server
,
fhandle
,
info
);
trace_nfs4_lookup_root
(
server
,
fhandle
,
info
->
fattr
,
err
);
switch
(
err
)
{
switch
(
err
)
{
case
0
:
case
0
:
case
-
NFS4ERR_WRONGSEC
:
case
-
NFS4ERR_WRONGSEC
:
...
@@ -2906,8 +2907,9 @@ static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
...
@@ -2906,8 +2907,9 @@ static int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
struct
nfs4_exception
exception
=
{
};
struct
nfs4_exception
exception
=
{
};
int
err
;
int
err
;
do
{
do
{
err
=
nfs4_handle_exception
(
server
,
err
=
_nfs4_proc_getattr
(
server
,
fhandle
,
fattr
,
label
);
_nfs4_proc_getattr
(
server
,
fhandle
,
fattr
,
label
),
trace_nfs4_getattr
(
server
,
fhandle
,
fattr
,
err
);
err
=
nfs4_handle_exception
(
server
,
err
,
&
exception
);
&
exception
);
}
while
(
exception
.
retry
);
}
while
(
exception
.
retry
);
return
err
;
return
err
;
...
@@ -3760,6 +3762,7 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
...
@@ -3760,6 +3762,7 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
do
{
do
{
err
=
_nfs4_do_fsinfo
(
server
,
fhandle
,
fsinfo
);
err
=
_nfs4_do_fsinfo
(
server
,
fhandle
,
fsinfo
);
trace_nfs4_fsinfo
(
server
,
fhandle
,
fsinfo
->
fattr
,
err
);
if
(
err
==
0
)
{
if
(
err
==
0
)
{
struct
nfs_client
*
clp
=
server
->
nfs_client
;
struct
nfs_client
*
clp
=
server
->
nfs_client
;
...
...
fs/nfs/nfs4trace.h
View file @
b5f875a9
...
@@ -174,6 +174,24 @@
...
@@ -174,6 +174,24 @@
{ ((__force unsigned long)FMODE_WRITE), "WRITE" }, \
{ ((__force unsigned long)FMODE_WRITE), "WRITE" }, \
{ ((__force unsigned long)FMODE_EXEC), "EXEC" })
{ ((__force unsigned long)FMODE_EXEC), "EXEC" })
#define show_nfs_fattr_flags(valid) \
__print_flags((unsigned long)valid, "|", \
{ NFS_ATTR_FATTR_TYPE, "TYPE" }, \
{ NFS_ATTR_FATTR_MODE, "MODE" }, \
{ NFS_ATTR_FATTR_NLINK, "NLINK" }, \
{ NFS_ATTR_FATTR_OWNER, "OWNER" }, \
{ NFS_ATTR_FATTR_GROUP, "GROUP" }, \
{ NFS_ATTR_FATTR_RDEV, "RDEV" }, \
{ NFS_ATTR_FATTR_SIZE, "SIZE" }, \
{ NFS_ATTR_FATTR_FSID, "FSID" }, \
{ NFS_ATTR_FATTR_FILEID, "FILEID" }, \
{ NFS_ATTR_FATTR_ATIME, "ATIME" }, \
{ NFS_ATTR_FATTR_MTIME, "MTIME" }, \
{ NFS_ATTR_FATTR_CTIME, "CTIME" }, \
{ NFS_ATTR_FATTR_CHANGE, "CHANGE" }, \
{ NFS_ATTR_FATTR_OWNER_NAME, "OWNER_NAME" }, \
{ NFS_ATTR_FATTR_GROUP_NAME, "GROUP_NAME" })
DECLARE_EVENT_CLASS
(
nfs4_clientid_event
,
DECLARE_EVENT_CLASS
(
nfs4_clientid_event
,
TP_PROTO
(
TP_PROTO
(
const
struct
nfs_client
*
clp
,
const
struct
nfs_client
*
clp
,
...
@@ -627,6 +645,57 @@ DEFINE_NFS4_INODE_EVENT(nfs4_set_security_label);
...
@@ -627,6 +645,57 @@ DEFINE_NFS4_INODE_EVENT(nfs4_set_security_label);
DEFINE_NFS4_INODE_EVENT
(
nfs4_recall_delegation
);
DEFINE_NFS4_INODE_EVENT
(
nfs4_recall_delegation
);
DEFINE_NFS4_INODE_EVENT
(
nfs4_delegreturn
);
DEFINE_NFS4_INODE_EVENT
(
nfs4_delegreturn
);
DECLARE_EVENT_CLASS
(
nfs4_getattr_event
,
TP_PROTO
(
const
struct
nfs_server
*
server
,
const
struct
nfs_fh
*
fhandle
,
const
struct
nfs_fattr
*
fattr
,
int
error
),
TP_ARGS
(
server
,
fhandle
,
fattr
,
error
),
TP_STRUCT__entry
(
__field
(
dev_t
,
dev
)
__field
(
u32
,
fhandle
)
__field
(
u64
,
fileid
)
__field
(
unsigned
int
,
valid
)
__field
(
int
,
error
)
),
TP_fast_assign
(
__entry
->
dev
=
server
->
s_dev
;
__entry
->
valid
=
fattr
->
valid
;
__entry
->
fhandle
=
nfs_fhandle_hash
(
fhandle
);
__entry
->
fileid
=
(
fattr
->
valid
&
NFS_ATTR_FATTR_FILEID
)
?
fattr
->
fileid
:
0
;
__entry
->
error
=
error
;
),
TP_printk
(
"error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
"valid=%s"
,
__entry
->
error
,
show_nfsv4_errors
(
__entry
->
error
),
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
(
unsigned
long
long
)
__entry
->
fileid
,
__entry
->
fhandle
,
show_nfs_fattr_flags
(
__entry
->
valid
)
)
);
#define DEFINE_NFS4_GETATTR_EVENT(name) \
DEFINE_EVENT(nfs4_getattr_event, name, \
TP_PROTO( \
const struct nfs_server *server, \
const struct nfs_fh *fhandle, \
const struct nfs_fattr *fattr, \
int error \
), \
TP_ARGS(server, fhandle, fattr, error))
DEFINE_NFS4_GETATTR_EVENT
(
nfs4_getattr
);
DEFINE_NFS4_GETATTR_EVENT
(
nfs4_lookup_root
);
DEFINE_NFS4_GETATTR_EVENT
(
nfs4_fsinfo
);
DECLARE_EVENT_CLASS
(
nfs4_idmap_event
,
DECLARE_EVENT_CLASS
(
nfs4_idmap_event
,
TP_PROTO
(
TP_PROTO
(
const
char
*
name
,
const
char
*
name
,
...
...
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