rqst.rq_iov = iov;
        rqst.rq_nvec = 1;
 
+       trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid);
        rc = SMB2_close_init(tcon, &rqst, persistent_fid, volatile_fid);
        if (rc)
                goto close_exit;
                trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid,
                                     rc);
                goto close_exit;
-       }
+       } else
+               trace_smb3_close_done(xid, persistent_fid, tcon->tid,
+                                     ses->Suid);
 
        atomic_dec(&tcon->num_remote_opens);
 
        if (rc)
                goto flush_exit;
 
+       trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid);
        rc = cifs_send_recv(xid, ses, &rqst, &resp_buftype, flags, &rsp_iov);
 
        if (rc != 0) {
                cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE);
                trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid,
                                     rc);
-       }
+       } else
+               trace_smb3_flush_done(xid, persistent_fid, tcon->tid,
+                                     ses->Suid);
 
  flush_exit:
        SMB2_flush_free(&rqst);
 
 /*
  * For handle based calls other than read and write, and get/set info
  */
+DECLARE_EVENT_CLASS(smb3_fd_class,
+       TP_PROTO(unsigned int xid,
+               __u64   fid,
+               __u32   tid,
+               __u64   sesid),
+       TP_ARGS(xid, fid, tid, sesid),
+       TP_STRUCT__entry(
+               __field(unsigned int, xid)
+               __field(__u64, fid)
+               __field(__u32, tid)
+               __field(__u64, sesid)
+       ),
+       TP_fast_assign(
+               __entry->xid = xid;
+               __entry->fid = fid;
+               __entry->tid = tid;
+               __entry->sesid = sesid;
+       ),
+       TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx",
+               __entry->xid, __entry->sesid, __entry->tid, __entry->fid)
+)
+
+#define DEFINE_SMB3_FD_EVENT(name)          \
+DEFINE_EVENT(smb3_fd_class, smb3_##name,    \
+       TP_PROTO(unsigned int xid,              \
+               __u64   fid,                    \
+               __u32   tid,                    \
+               __u64   sesid),                 \
+       TP_ARGS(xid, fid, tid, sesid))
+
+DEFINE_SMB3_FD_EVENT(flush_enter);
+DEFINE_SMB3_FD_EVENT(flush_done);
+DEFINE_SMB3_FD_EVENT(close_enter);
+DEFINE_SMB3_FD_EVENT(close_done);
+
 DECLARE_EVENT_CLASS(smb3_fd_err_class,
        TP_PROTO(unsigned int xid,
                __u64   fid,