diff mbox series

[15/28] lustre: llite: Make iotrace logging quieter

Message ID 1655560330-30743-16-git-send-email-jsimmons@infradead.org (mailing list archive)
State Not Applicable
Headers show
Series lustre: sync to OpenSFS June 15, 2022 | expand

Commit Message

James Simmons June 18, 2022, 1:51 p.m. UTC
From: Patrick Farrell <pfarrell@whamcloud.com>

Most of the time, we don't read any pages with readahead,
since we're moving through the window and aren't ready to
read more yet.  That's important for readahead debug, but
there's no need to log it for iotrace.  (This matters
because without this change, this message is the large
majority of iotrace messages.)

WC-bug-id: https://jira.whamcloud.com/browse/LU-15317
Lustre-commit: a91b5d4a990c6a870 ("LU-15317 llite: Make iotrace logging quieter")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45887
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/llite/rw.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/lustre/llite/rw.c b/fs/lustre/llite/rw.c
index bd02a28..239f78b 100644
--- a/fs/lustre/llite/rw.c
+++ b/fs/lustre/llite/rw.c
@@ -1692,7 +1692,10 @@  int ll_io_read_page(const struct lu_env *env, struct cl_io *io,
 		rc2 = ll_readahead(env, io, &queue->c2_qin, ras,
 				   uptodate, file, skip_index,
 				   &ra_start_index);
-		CDEBUG(D_READA|D_IOTRACE,
+		/* to keep iotrace clean, we only print here if we actually
+		 * read pages
+		 */
+		CDEBUG(D_READA | (rc2 ? D_IOTRACE : 0),
 		       DFID " %d pages read ahead at %lu, triggered by user read at %lu\n",
 		       PFID(ll_inode2fid(inode)), rc2, ra_start_index,
 		       vvp_index(vpg));