Whamcloud - gitweb
LU-15069 llite: Remove ras_set_start 52/45652/11
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 14 Feb 2024 17:40:21 +0000 (12:40 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Mar 2024 20:00:55 +0000 (20:00 +0000)
ras_set_start is a one line function and serves only to
obfuscate how simple "set_start" actually is.

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

index cd97b13..55ddd8b 100644 (file)
@@ -928,18 +928,13 @@ static int ll_readpages(const struct lu_env *env, struct cl_io *io,
        RETURN(count > 0 ? count : ret);
 }
 
-static void ras_set_start(struct ll_readahead_state *ras, pgoff_t index)
-{
-       ras->ras_window_start_idx = ras_align(ras, index);
-}
-
 /* called with the ras_lock held or from places where it doesn't matter */
 static void ras_reset(struct ll_readahead_state *ras, pgoff_t index)
 {
        ras->ras_consecutive_requests = 0;
        ras->ras_consecutive_bytes = 0;
        ras->ras_window_pages = 0;
-       ras_set_start(ras, index);
+       ras->ras_window_start_idx = ras_align(ras, index);
        ras->ras_next_readahead_idx = max(ras->ras_window_start_idx, index + 1);
 
        RAS_CDEBUG(ras);
@@ -1423,7 +1418,7 @@ static void ras_update(struct ll_sb_info *sbi, struct inode *inode,
        }
 
 skip:
-       ras_set_start(ras, index);
+       ras->ras_window_start_idx = ras_align(ras, index);
 
        if (stride_io_mode(ras)) {
                /* Since stride readahead is sentivite to the offset