* [PATCH][SMB3] add dynamic trace point for debugging lease break not found
@ 2022-05-18 21:33 Steve French
2022-05-18 22:34 ` ronnie sahlberg
0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2022-05-18 21:33 UTC (permalink / raw)
To: CIFS
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
Looks like we don't have a dynamic trace point to catch the case where
the server sends a lease break we don't recognize. Attached is a WIP
patch for doing this. Thoughts?
--
Thanks,
Steve
[-- Attachment #2: dynamic-trace-lease-break-not-found.patch --]
[-- Type: text/x-patch, Size: 971 bytes --]
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 3fe47a88f47d..6f049da5a8c1 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -656,6 +656,9 @@ smb2_is_valid_lease_break(char *buffer)
}
spin_unlock(&cifs_tcp_ses_lock);
cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
+ trace_smb3_lease_not_found(le32_to_cpu(rsp->CurrentLeaseState), le32_to_cpu(rsp->hdr.Id.SyncId.TreeId),
+ le64_to_cpu(rsp->hdr.SessionId), *((u64 *)rsp->LeaseKey), *((u64 *)&rsp->LeaseKey[8]));
+
return false;
}
diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h
index bc279616c513..09d3dfed86d9 100644
--- a/fs/cifs/trace.h
+++ b/fs/cifs/trace.h
@@ -814,6 +814,7 @@ DEFINE_EVENT(smb3_lease_done_class, smb3_##name, \
TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high))
DEFINE_SMB3_LEASE_DONE_EVENT(lease_done);
+DEFINE_SMB3_LEASE_DONE_EVENT(lease_not_found);
DECLARE_EVENT_CLASS(smb3_lease_err_class,
TP_PROTO(__u32 lease_state,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][SMB3] add dynamic trace point for debugging lease break not found
2022-05-18 21:33 [PATCH][SMB3] add dynamic trace point for debugging lease break not found Steve French
@ 2022-05-18 22:34 ` ronnie sahlberg
0 siblings, 0 replies; 2+ messages in thread
From: ronnie sahlberg @ 2022-05-18 22:34 UTC (permalink / raw)
To: Steve French; +Cc: CIFS
LGTM
Acked-by me
On Thu, 19 May 2022 at 07:35, Steve French <smfrench@gmail.com> wrote:
>
> Looks like we don't have a dynamic trace point to catch the case where
> the server sends a lease break we don't recognize. Attached is a WIP
> patch for doing this. Thoughts?
>
>
>
> --
> Thanks,
>
> Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-18 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 21:33 [PATCH][SMB3] add dynamic trace point for debugging lease break not found Steve French
2022-05-18 22:34 ` ronnie sahlberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.