From e17f166ca18146f955c211a29822af183f6f6959 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 14 Feb 2024 12:41:32 -0500 Subject: [PATCH] LU-15069 llite: Add RAS_CDEBUG in needed spots Some of the basic readahead state controlling functions don't dump the readahead state. Fix that. Test-Parameters: trivial Signed-off-by: Patrick Farrell Change-Id: Ia36a8437d1877a31bfc18c1b6a4170f31383ae66 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45656 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin --- lustre/llite/rw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index e311f40..5d45365 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -1182,6 +1182,7 @@ static void ras_detect_read_pattern(struct ll_readahead_state *ras, bool stride_detect = false; pgoff_t index = pos >> PAGE_SHIFT; + RAS_CDEBUG(ras); /* * Reset the read-ahead window in two cases. First when the app seeks * or reads to some other part of the file. Secondly if we get a @@ -1235,6 +1236,7 @@ static void ras_detect_read_pattern(struct ll_readahead_state *ras, } ras->ras_last_read_end_bytes = pos + bytes - 1; + RAS_CDEBUG(ras); } void ll_ras_enter(struct file *f, loff_t pos, size_t bytes) @@ -1322,6 +1324,8 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode, ENTRY; spin_lock(&ras->ras_lock); + RAS_CDEBUG(ras); + if (!hit) CDEBUG(D_READA|D_IOTRACE, DFID " pages at %lu miss.\n", PFID(ll_inode2fid(inode)), index); @@ -1444,6 +1448,7 @@ skip_miss_checking: EXIT; out_unlock: + RAS_CDEBUG(ras); spin_unlock(&ras->ras_lock); } -- 1.8.3.1