Skip to content

Commit 35a2b53

Browse files
committed
smb3: add trace point for oplock not found
In order to debug problems with server potentially sending us an oplock that we don't recognize (or a race with close and oplock break) it would be helpful to have a dynamic trace point for this case. New tracepoint is called trace_smb3_oplock_not_found Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 2b058ac commit 35a2b53

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

fs/cifs/smb2misc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
732732
}
733733
spin_unlock(&cifs_tcp_ses_lock);
734734
cifs_dbg(FYI, "No file id matched, oplock break ignored\n");
735+
trace_smb3_oplock_not_found(0 /* no xid */, rsp->PersistentFid,
736+
le32_to_cpu(rsp->hdr.Id.SyncId.TreeId),
737+
le64_to_cpu(rsp->hdr.SessionId));
738+
735739
return true;
736740
}
737741

fs/cifs/trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ DEFINE_SMB3_FD_EVENT(flush_enter);
158158
DEFINE_SMB3_FD_EVENT(flush_done);
159159
DEFINE_SMB3_FD_EVENT(close_enter);
160160
DEFINE_SMB3_FD_EVENT(close_done);
161+
DEFINE_SMB3_FD_EVENT(oplock_not_found);
161162

162163
DECLARE_EVENT_CLASS(smb3_fd_err_class,
163164
TP_PROTO(unsigned int xid,

0 commit comments

Comments
 (0)