From 829a24f644ceb453124b72c94584404d2e97f4f9 Mon Sep 17 00:00:00 2001 From: Qian Yingjin Date: Fri, 19 May 2017 16:49:08 +0800 Subject: [PATCH 1/1] LU-8849 ofd: Client hanges on ladvise with large start values when the ladvise end is larger than file size, we don't judge the ladvise start should be smaller than the ladvise end after capped the end vaule to file size. This patch fixes the problem. Change-Id: I30346c7ce69ad0d7ceca5ffc0d21d900afd3d2f1 Signed-off-by: Qian Yingjin Reviewed-on: https://review.whamcloud.com/27209 Reviewed-by: Wang Shilong Reviewed-by: Li Xi Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/ofd/ofd_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 3f0e426..c3d578e 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -2138,7 +2138,7 @@ static int ofd_ladvise_prefetch(const struct lu_env *env, if (end > info->fti_attr.la_size) end = info->fti_attr.la_size; - if (end == 0) + if (end <= start) GOTO(out_unlock, rc); /* We need page aligned offset and length */ -- 1.8.3.1