Whamcloud - gitweb
LU-14616 readahead: export pages directly without RA
authorWang Shilong <wshilong@ddn.com>
Fri, 16 Apr 2021 02:04:17 +0000 (10:04 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Jul 2021 15:40:43 +0000 (15:40 +0000)
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 <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-on: https://review.whamcloud.com/44246
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/rw.c

index 30d3207..530a59e 100644 (file)
@@ -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 */