Missing read completion trace point
diff mbox series

Message ID CAH2r5msw+fWYYm1tDFOcpy4Cny6asUOLyEpG+A1dUFbPwaKGUw@mail.gmail.com
State New
Headers show
Series
  • Missing read completion trace point
Related show

Commit Message

Steve French Feb. 25, 2019, 9:09 p.m. UTC
We were missing one path in dynamic traces of smb3 reads (when ENODATA returned)

Patch
diff mbox series

From 9747f639bd4446f98d1dd05de53ac76e5569d707 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Mon, 25 Feb 2019 15:02:58 -0600
Subject: [PATCH] smb3: add missing read completion trace point

When ENODATA returned we weren't logging the read completion
(not an error, but can be indicated by logging length 0) which
makes looking at read traces confusing for smb3.

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2pdu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index ec9abe293279..c68207b46d98 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3404,7 +3404,10 @@  SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
 					    io_parms->tcon->tid, ses->Suid,
 					    io_parms->offset, io_parms->length,
 					    rc);
-		}
+		} else
+			trace_smb3_read_done(xid, req->PersistentFileId,
+				    io_parms->tcon->tid, ses->Suid,
+				    io_parms->offset, 0);
 		free_rsp_buf(resp_buftype, rsp_iov.iov_base);
 		return rc == -ENODATA ? 0 : rc;
 	} else
-- 
2.17.1