X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Frw.c;h=355d07e54c55d75648ac4c01780fc69f8551a18f;hp=ef26a13409c8c9c54638d5d90f987f38ec35cfbb;hb=82d485c9b47a2eb15784ccbfca9d656aff81f518;hpb=80b00a3a715b33d56e71b88dce11283aa53bf1eb diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index ef26a13..355d07e 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -332,8 +332,11 @@ static int cl_read_ahead_page(const struct lu_env *env, struct cl_io *io, if (!cp->cpg_defer_uptodate && !PageUptodate(vmpage)) { CDEBUG(D_READA, "page index %lu, max_index: %lu\n", ccc_index(cp), *max_index); - if (*max_index == 0 || ccc_index(cp) > *max_index) - rc = cl_page_is_under_lock(env, io, page, max_index); + /* Disable the optimization on prefetching maximum readahead + * index because there is a race with lock cancellation. This + * optimization will be revived later. + * if (*max_index == 0 || ccc_index(cp) > *max_index) */ + rc = cl_page_is_under_lock(env, io, page, max_index); if (rc == 0) { cp->cpg_defer_uptodate = 1; cp->cpg_ra_used = 0;