From fb2697a561f72b28023697968face1ec25da8575 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Tue, 19 Sep 2023 01:14:39 -0500
Subject: [PATCH] Add dynamic trace points for RDMA (smbdirect) reconnect
smb3_smbd_connect_done and smb3_smbd_connect_err
To improve debugging of RDMA issues add those two. We already
had dynamic tracepoints for non-RDMA connect done and error cases.
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/smb/client/smbdirect.c | 5 ++++-
fs/smb/client/trace.h | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
@@ -1401,8 +1401,11 @@ int smbd_reconnect(struct TCP_Server_Info *server)
server->smbd_conn = smbd_get_connection(
server, (struct sockaddr *) &server->dstaddr);
- if (server->smbd_conn)
+ if (server->smbd_conn) {
cifs_dbg(VFS, "RDMA transport re-established\n");
+ trace_smb3_smbd_connect_done(server->hostname, server->conn_id, &server->dstaddr);
+ } else
+ trace_smb3_smbd_connect_err(server->hostname, server->conn_id, &server->dstaddr);
return server->smbd_conn ? 0 : -ENOENT;
}
@@ -935,6 +935,8 @@ DEFINE_EVENT(smb3_connect_class, smb3_##name, \
TP_ARGS(hostname, conn_id, addr))
DEFINE_SMB3_CONNECT_EVENT(connect_done);
+DEFINE_SMB3_CONNECT_EVENT(smbd_connect_done);
+DEFINE_SMB3_CONNECT_EVENT(smbd_connect_err);
DECLARE_EVENT_CLASS(smb3_connect_err_class,
TP_PROTO(char *hostname, __u64 conn_id,
--
2.39.2