Whamcloud - gitweb
LU-8849 ofd: Client hanges on ladvise with large start values 09/27209/3
authorQian Yingjin <qian@ddn.com>
Fri, 19 May 2017 08:49:08 +0000 (16:49 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 22 Jul 2017 02:54:38 +0000 (02:54 +0000)
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 <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/27209
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ofd/ofd_dev.c

index 3f0e426..c3d578e 100644 (file)
@@ -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 */