From: Wang Shilong Date: Fri, 16 Apr 2021 02:04:17 +0000 (+0800) Subject: LU-14616 readahead: export pages directly without RA X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=d6a49c68159f8cfef5be861f82f276e77d1c28da;p=fs%2Flustre-release.git LU-14616 readahead: export pages directly without RA 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. Lustre-change: https://review.whamcloud.com/43338 Lustre-commit: 9f1c0bfd10d619a3755c3b22b1dd95a593720ce9 Fixes: 7e8efb339b ("LU-12043 llite: fix to submit complete read block with ra disabled") Change-Id: I1c9134f5972aa0d0e7aac998f02c690cc55b433b Signed-off-by: Wang Shilong Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Reviewed-on: https://review.whamcloud.com/44246 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 30d3207..530a59e 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -243,8 +243,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 */