linux/include
Xiubo Li 8e46a2d068 libceph: just wait for more data to be available on the socket
A short read may occur while reading the message footer from the
socket.  Later, when the socket is ready for another read, the
messenger invokes all read_partial_*() handlers, including
read_partial_sparse_msg_data().  The expectation is that
read_partial_sparse_msg_data() would bail, allowing the messenger to
invoke read_partial() for the footer and pick up where it left off.

However read_partial_sparse_msg_data() violates that and ends up
calling into the state machine in the OSD client.  The sparse-read
state machine assumes that it's a new op and interprets some piece of
the footer as the sparse-read header and returns bogus extents/data
length, etc.

To determine whether read_partial_sparse_msg_data() should bail, let's
reuse cursor->total_resid.  Because once it reaches to zero that means
all the extents and data have been successfully received in last read,
else it could break out when partially reading any of the extents and
data.  And then osd_sparse_read() could continue where it left off.

[ idryomov: changelog ]

Link: https://tracker.ceph.com/issues/63586
Fixes: d396f89db3 ("libceph: add sparse read support to msgr1")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-02-07 14:43:29 +01:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux libceph: just wait for more data to be available on the socket 2024-02-07 14:43:29 +01:00
math-emu
media
memory
misc
net netfilter pull request 24-01-31 2024-02-01 09:14:13 -08:00
pcmcia
ras
rdma
rv
scsi
soc
sound ASoC: cs35l56: Allow more time for firmware to boot 2024-02-01 12:57:26 +00:00
target
trace Miscellaneous bug fixes and cleanups in ext4's multi-block allocator 2024-02-04 07:33:01 +00:00
uapi TTY/Serial driver fixes for 6.8-rc3 2024-02-04 06:58:23 +00:00
ufs
vdso
video
xen