Whamcloud - gitweb
LU-13775 target: fix memory copy in tgt_pages2shortio() 33/39333/4
authorWang Shilong <wshilong@ddn.com>
Fri, 10 Jul 2020 07:29:39 +0000 (15:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 7 Aug 2020 04:59:15 +0000 (04:59 +0000)
commitb8faae3756e5ded135b392209125975807021691
treedaffcbc51f961a17ddd8b98bdd13d0a1174a0d5d
parent5f2c44bf626b178503c1c4d2d85c40bae087ff4f
LU-13775 target: fix memory copy in tgt_pages2shortio()

tgt_pages2shortio() try to copy local pages memory to ptlrpc
inline buf.

The right logic should move page @ptr to offset + count, however,
it does this logic wrongly, this doesn't cause any problem so
far, because normally @lnb_page_offset is 0. when i tried to
play with unaligned DIO, we could hit the problem.

Anyway, fix to use right logic to handle memory.

Fixes: 70f092a ("LU-1757 brw: add short io osc/ost transfer.")
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I0a2e05732c0f425043af8393eb41f6bec178da6f
Reviewed-on: https://review.whamcloud.com/39333
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/target/tgt_handler.c