Whamcloud - gitweb
LU-13541 llite: fix possible divide zero in ll_use_fast_io() 45/38545/2
authorWang Shilong <wshilong@ddn.com>
Thu, 7 May 2020 00:58:54 +0000 (08:58 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 16 May 2020 06:23:06 +0000 (06:23 +0000)
commit7cd0afe583211a11cfe3c1041e5b982e65769f37
tree60df95d018175909ab2defb7c4f893fb68e4bf09
parenta9b9dd8312417fcb82513108f11b4684b67aefaa
LU-13541 llite: fix possible divide zero in ll_use_fast_io()

ll_use_fast_io() is used to check wheather we could use fast IO.
Since it is called in fast path, we don't hold ras_lock to protect
access, there might have the race @ras_stride_bytes is reset after
stride_io_mode() check.

Fixes: 9e4c5bdaaec5 ("LU-12644 llite: try fast io for stride io correctly")
Change-Id: If57ad074ecfa6560cc527f9f52e7adc2b0a456fd
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/38545
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/rw.c