Whamcloud - gitweb
LU-13412 llite: fix read if readahead window smaller than rpc size 32/38132/3
authorWang Shilong <wshilong@ddn.com>
Fri, 3 Apr 2020 13:14:25 +0000 (21:14 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 May 2020 05:04:45 +0000 (05:04 +0000)
commit33d08805f27bb9a4c374754505f2ef5431b9fd31
tree246daed74aa5eaeb4e9489ffb5fe6487e08b0ee7
parentfb3ed0fe68e324f8d6e002a32486de7f5d38f2e3
LU-13412 llite: fix read if readahead window smaller than rpc size

Readahead always try to align readahead with RPC size, but this
could introduce a problem if readahead window is smaller than RPC size.

With current codes, it will fallback a lot of 4k read because
RPC aligned window start plus window pages will be behind of
current read. Fix this to align with readahead window rather
than RPC size in this case.

Change-Id: I0cd33ac7f92a75f38c926db33630f3036bbfd6c7
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/38132
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/rw.c