Commit d42043a6 authored by Steve French's avatar Steve French

smb3: add dynamic trace point for query_info_enter/done

Adds dynamic trace points for the query_info_enter
and query_info_done (no error) case.  We only had one
existing trace point related to this which was on query_info
errors.  Note that these two new tracepoints are for the
non-compounded query_info paths.

Sample output (from: trace-cmd record -e smb3_query_info*)

          ls-24140 [001] .... 27811.866068: smb3_query_info_enter: xid=7 sid=0xd2d00587 tid=0xb5441939 fid=0xcf082bac class=18 type=0x1
          ls-24140 [001] .... 27811.867656: smb3_query_info_done: xid=7 sid=0xd2d00587 tid=0xb5441939 fid=0xcf082bac class=18 type=0x1
  getcifsacl-24149 [005] .... 27854.759873: smb3_query_info_enter: xid=15 sid=0xd2d00587 tid=0xb5441939 fid=0x99896e72 class=0 type=0x3
  getcifsacl-24149 [005] .... 27854.761730: smb3_query_info_done: xid=15 sid=0xd2d00587 tid=0xb5441939 fid=0x99896e72 class=0 type=0x3
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
parent 53a3e0d9
...@@ -2868,6 +2868,9 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -2868,6 +2868,9 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon,
if (rc) if (rc)
goto qinf_exit; goto qinf_exit;
trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid,
ses->Suid, info_class, (__u32)info_type);
rc = cifs_send_recv(xid, ses, &rqst, &resp_buftype, flags, &rsp_iov); rc = cifs_send_recv(xid, ses, &rqst, &resp_buftype, flags, &rsp_iov);
rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base; rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
...@@ -2878,6 +2881,9 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -2878,6 +2881,9 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon,
goto qinf_exit; goto qinf_exit;
} }
trace_smb3_query_info_done(xid, persistent_fid, tcon->tid,
ses->Suid, info_class, (__u32)info_type);
if (dlen) { if (dlen) {
*dlen = le32_to_cpu(rsp->OutputBufferLength); *dlen = le32_to_cpu(rsp->OutputBufferLength);
if (!*data) { if (!*data) {
......
...@@ -153,6 +153,48 @@ DEFINE_SMB3_FD_ERR_EVENT(close_err); ...@@ -153,6 +153,48 @@ DEFINE_SMB3_FD_ERR_EVENT(close_err);
/* /*
* For handle based query/set info calls * For handle based query/set info calls
*/ */
DECLARE_EVENT_CLASS(smb3_inf_enter_class,
TP_PROTO(unsigned int xid,
__u64 fid,
__u32 tid,
__u64 sesid,
__u8 infclass,
__u32 type),
TP_ARGS(xid, fid, tid, sesid, infclass, type),
TP_STRUCT__entry(
__field(unsigned int, xid)
__field(__u64, fid)
__field(__u32, tid)
__field(__u64, sesid)
__field(__u8, infclass)
__field(__u32, type)
),
TP_fast_assign(
__entry->xid = xid;
__entry->fid = fid;
__entry->tid = tid;
__entry->sesid = sesid;
__entry->infclass = infclass;
__entry->type = type;
),
TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx class=%u type=0x%x",
__entry->xid, __entry->sesid, __entry->tid, __entry->fid,
__entry->infclass, __entry->type)
)
#define DEFINE_SMB3_INF_ENTER_EVENT(name) \
DEFINE_EVENT(smb3_inf_enter_class, smb3_##name, \
TP_PROTO(unsigned int xid, \
__u64 fid, \
__u32 tid, \
__u64 sesid, \
__u8 infclass, \
__u32 type), \
TP_ARGS(xid, fid, tid, sesid, infclass, type))
DEFINE_SMB3_INF_ENTER_EVENT(query_info_enter);
DEFINE_SMB3_INF_ENTER_EVENT(query_info_done);
DECLARE_EVENT_CLASS(smb3_inf_err_class, DECLARE_EVENT_CLASS(smb3_inf_err_class,
TP_PROTO(unsigned int xid, TP_PROTO(unsigned int xid,
__u64 fid, __u64 fid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment