Whamcloud - gitweb
LU-15069 llite: Add RAS_CDEBUG in needed spots 56/45656/9
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 14 Feb 2024 17:41:32 +0000 (12:41 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Mar 2024 20:01:22 +0000 (20:01 +0000)
Some of the basic readahead state controlling functions
don't dump the readahead state.

Fix that.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ia36a8437d1877a31bfc18c1b6a4170f31383ae66
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45656
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/rw.c

index e311f40..5d45365 100644 (file)
@@ -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);
 }