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>
return -EINVAL;
ptr = kmap_atomic(local[i].lnb_page);
return -EINVAL;
ptr = kmap_atomic(local[i].lnb_page);
- memcpy(buf + off, ptr, len);
+ memcpy(buf, ptr + off, len);
kunmap_atomic(ptr);
buf += len;
size -= len;
kunmap_atomic(ptr);
buf += len;
size -= len;