[lustre-devel] [PATCH 05/13] lustre: readahead: export pages directly without RA
James Simmons
jsimmons at infradead.org
Sat May 15 06:06:02 PDT 2021
From: Wang Shilong <wshilong at ddn.com>
With Readahead disabled, @vpg_defer_uptodate should not
be set as we don't reserve credits for such read.
In vvp_page_completion_read() we will call ll_ra_count_put()
which makes @ra_cur_pages negative.
Fixes: 3b1dfe4b4b ("lustre: llite: fix to submit complete read block with ra disabled")
WC-bug-id: https://jira.whamcloud.com/browse/LU-14616
Lustre-commit: 9f1c0bfd10d619a3 ("LU-14616 readahead: export pages directly without RA")
Signed-off-by: Wang Shilong <wshilong at ddn.com>
Reviewed-on: https://review.whamcloud.com/43338
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Bobi Jam <bobijam at hotmail.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/llite/rw.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/lustre/llite/rw.c b/fs/lustre/llite/rw.c
index 08ab25d..8dcbef3 100644
--- a/fs/lustre/llite/rw.c
+++ b/fs/lustre/llite/rw.c
@@ -237,8 +237,10 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io,
cl_page_assume(env, io, page);
vpg = cl2vvp_page(cl_object_page_slice(clob, page));
if (!vpg->vpg_defer_uptodate && !PageUptodate(vmpage)) {
- vpg->vpg_defer_uptodate = 1;
- vpg->vpg_ra_used = 0;
+ if (hint == MAYNEED) {
+ vpg->vpg_defer_uptodate = 1;
+ vpg->vpg_ra_used = 0;
+ }
cl_page_list_add(queue, page);
} else {
/* skip completed pages */
--
1.8.3.1
More information about the lustre-devel
mailing list