@@ -327,6 +327,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
atomic_read(&server->smbd_conn->mr_used_count));
skip_rdma:
#endif
+ seq_printf(m, "\nNumber of reconnects: %d",
+ server->num_reconnects);
seq_printf(m, "\nNumber of credits: %d Dialect 0x%x",
server->credits, server->dialect);
if (server->sign)
@@ -716,6 +716,10 @@ struct TCP_Server_Info {
* reconnect.
*/
int nr_targets;
+ /*
+ * Number of reconnects.
+ */
+ int num_reconnects;
};
struct cifs_credits {
@@ -512,6 +512,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
/* do not want to be sending data on a socket we are freeing */
cifs_dbg(FYI, "%s: tearing down socket\n", __func__);
mutex_lock(&server->srv_mutex);
+ server->num_reconnects++;
if (server->ssocket) {
cifs_dbg(FYI, "State: 0x%x Flags: 0x%lx\n",
server->ssocket->state, server->ssocket->flags);
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> --- fs/cifs/cifs_debug.c | 2 ++ fs/cifs/cifsglob.h | 4 ++++ fs/cifs/connect.c | 1 + 3 files changed, 7 insertions(+)