SUNRPC: Fix the recent bv_offset fix
authorChuck Lever <chuck.lever@oracle.com>
Mon, 28 Aug 2023 13:23:00 +0000 (09:23 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 29 Aug 2023 21:44:12 +0000 (17:44 -0400)
commitf16ff1cafbf1e65cc706af912df90bcc15d39a6c
treeb025c623a100760af0e90508ec51ac14f987df5d
parent2dde18cd1d8fac735875f2e4987f11817cc0bc2c
SUNRPC: Fix the recent bv_offset fix

Jeff confirmed his original fix addressed his pynfs test failure,
but this same bug also impacted qemu: accessing qcow2 virtual disks
using direct I/O was failing. Jeff's fix missed that you have to
shorten the bio_vec element by the same amount as you increased
the page offset.

Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Fixes: c96e2a695e00 ("sunrpc: set the bv_offset of first bvec in svc_tcp_sendmsg")
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svcsock.c