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
nexedi
linux
Commits
7cd14861
Commit
7cd14861
authored
Aug 20, 2015
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Add a tracepoint for CB_GETATTR
Signed-off-by:
Trond Myklebust
<
trond.myklebust@primarydata.com
>
parent
6a463beb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
1 deletion
+64
-1
fs/nfs/callback_proc.c
fs/nfs/callback_proc.c
+5
-1
fs/nfs/nfs4trace.h
fs/nfs/nfs4trace.h
+59
-0
No files found.
fs/nfs/callback_proc.c
View file @
7cd14861
...
...
@@ -40,8 +40,11 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args,
rpc_peeraddr2str
(
cps
->
clp
->
cl_rpcclient
,
RPC_DISPLAY_ADDR
));
inode
=
nfs_delegation_find_inode
(
cps
->
clp
,
&
args
->
fh
);
if
(
inode
==
NULL
)
if
(
inode
==
NULL
)
{
trace_nfs4_cb_getattr
(
cps
->
clp
,
&
args
->
fh
,
inode
,
-
ntohl
(
res
->
status
));
goto
out
;
}
nfsi
=
NFS_I
(
inode
);
rcu_read_lock
();
delegation
=
rcu_dereference
(
nfsi
->
delegation
);
...
...
@@ -60,6 +63,7 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args,
res
->
status
=
0
;
out_iput:
rcu_read_unlock
();
trace_nfs4_cb_getattr
(
cps
->
clp
,
&
args
->
fh
,
inode
,
-
ntohl
(
res
->
status
));
iput
(
inode
);
out:
dprintk
(
"%s: exit with status = %d
\n
"
,
__func__
,
ntohl
(
res
->
status
));
...
...
fs/nfs/nfs4trace.h
View file @
7cd14861
...
...
@@ -884,6 +884,65 @@ DEFINE_NFS4_GETATTR_EVENT(nfs4_getattr);
DEFINE_NFS4_GETATTR_EVENT
(
nfs4_lookup_root
);
DEFINE_NFS4_GETATTR_EVENT
(
nfs4_fsinfo
);
DECLARE_EVENT_CLASS
(
nfs4_inode_callback_event
,
TP_PROTO
(
const
struct
nfs_client
*
clp
,
const
struct
nfs_fh
*
fhandle
,
const
struct
inode
*
inode
,
int
error
),
TP_ARGS
(
clp
,
fhandle
,
inode
,
error
),
TP_STRUCT__entry
(
__field
(
int
,
error
)
__field
(
dev_t
,
dev
)
__field
(
u32
,
fhandle
)
__field
(
u64
,
fileid
)
__string
(
dstaddr
,
clp
?
rpc_peeraddr2str
(
clp
->
cl_rpcclient
,
RPC_DISPLAY_ADDR
)
:
"unknown"
)
),
TP_fast_assign
(
__entry
->
error
=
error
;
__entry
->
fhandle
=
nfs_fhandle_hash
(
fhandle
);
if
(
inode
!=
NULL
)
{
__entry
->
fileid
=
NFS_FILEID
(
inode
);
__entry
->
dev
=
inode
->
i_sb
->
s_dev
;
}
else
{
__entry
->
fileid
=
0
;
__entry
->
dev
=
0
;
}
__assign_str
(
dstaddr
,
clp
?
rpc_peeraddr2str
(
clp
->
cl_rpcclient
,
RPC_DISPLAY_ADDR
)
:
"unknown"
)
),
TP_printk
(
"error=%d (%s) fileid=%02x:%02x:%llu fhandle=0x%08x "
"dstaddr=%s"
,
__entry
->
error
,
show_nfsv4_errors
(
__entry
->
error
),
MAJOR
(
__entry
->
dev
),
MINOR
(
__entry
->
dev
),
(
unsigned
long
long
)
__entry
->
fileid
,
__entry
->
fhandle
,
__get_str
(
dstaddr
)
)
);
#define DEFINE_NFS4_INODE_CALLBACK_EVENT(name) \
DEFINE_EVENT(nfs4_inode_callback_event, name, \
TP_PROTO( \
const struct nfs_client *clp, \
const struct nfs_fh *fhandle, \
const struct inode *inode, \
int error \
), \
TP_ARGS(clp, fhandle, inode, error))
DEFINE_NFS4_INODE_CALLBACK_EVENT
(
nfs4_cb_getattr
);
DECLARE_EVENT_CLASS
(
nfs4_idmap_event
,
TP_PROTO
(
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