Whamcloud - gitweb
LU-12518 llite: fix stride window increase 93/35893/5
authorWang Shilong <wshilong@ddn.com>
Fri, 23 Aug 2019 06:17:41 +0000 (14:17 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Feb 2020 05:50:13 +0000 (05:50 +0000)
commit0cc48c4adbe540f8e529f80e4262b6ff47649e7c
treee8cec68430ba52f49b7d7f5973970a6231e92b09
parent9e4c5bdaaec5ef347260f0fd2f916143224f3cc4
LU-12518 llite: fix stride window increase

Fix following problems:

1. stride_byte_count() argument @off should be @windows_start
rather than @stride_offset to calculate stride bytes.

2. In a limited memory client(for testing etc), we could possibly
have ra_rpc_size(64M) initially > ra_max_pages_per_file, this will
make possibly @window_len 0 after ras_increase_window()

3. @window_len in ras_stride_increase_window() could be negative,
be carefully to avoid overflow.

Change-Id: Ied00bec834d4bb0ad04b688c10a03bbcd667f39b
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/35893
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/rw.c