From: Jinshan Xiong Date: Mon, 5 May 2014 22:09:43 +0000 (-0700) Subject: LU-5010 llite: disable readahead optimization X-Git-Tag: 2.5.59~32 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=82d485c9b47a2eb15784ccbfca9d656aff81f518;p=fs%2Flustre-release.git LU-5010 llite: disable readahead optimization There exists a race between readahead lock matching and lock cancellation, where it's difficult to discard pages from radix tree if readahead process keeps adding pages. This issue is introduced in patch http://review.whamcloud.com/8523 here I'm going to disable it. The optimization will be added back in later patch. Signed-off-by: Jinshan Xiong Change-Id: Ifa729bfc4404ac287d4af3a88ead4790218817f8 Reviewed-on: http://review.whamcloud.com/10220 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin --- 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;