From: Chris Horn Date: Thu, 16 Sep 2021 17:12:38 +0000 (-0500) Subject: LU-15092 o2iblnd: Fix logic for unaligned transfer X-Git-Tag: 2.14.56~88 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=23a2c92f203ff2f39bcc083e6b6220968c17b475;hp=23a2c92f203ff2f39bcc083e6b6220968c17b475 LU-15092 o2iblnd: Fix logic for unaligned transfer It's possible for there to be an offset for the first page of a transfer. However, there are two bugs with this code in o2iblnd. The first is that this use-case will require LNET_MAX_IOV + 1 local RDMA fragments, but we do not specify the correct corresponding values for the max page list to ib_alloc_fast_reg_page_list(), ib_alloc_fast_reg_mr(), etc. The second issue is that the logic in kiblnd_setup_rd_kiov() attempts to obtain one more scatterlist entry than is actually needed. This causes the transfer to fail with -EFAULT. Test-Parameters: trivial HPE-bug-id: LUS-10407 Fixes: d226464aca ("LU-8057 ko2iblnd: Replace sg++ with sg = sg_next(sg)") Signed-off-by: Chris Horn Change-Id: Ifb843f11ae34a99b7d8f93d94966e3dfa1ce90e5 Reviewed-on: https://review.whamcloud.com/45216 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Andriy Skulysh Reviewed-by: Oleg Drokin ---