From 5a24dbd9d79cc0aac0d7d498d631c1e1b47be7c1 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 14 Feb 2024 12:40:21 -0500 Subject: [PATCH] LU-15069 llite: Remove ras_set_start 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 Change-Id: I95d0b891ea2c88354dcb9e5b5a205cafa19380c7 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/45652 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Timothy Day Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- lustre/llite/rw.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index cd97b13..55ddd8b 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -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 -- 1.8.3.1