libceph: add sparse read support to msgr1

Add 2 new fields to ceph_connection_v1_info to track the necessary info
in sparse reads. Skip initializing the cursor for a sparse read.

Break out read_partial_message_section into a wrapper around a new
read_partial_message_chunk function that doesn't zero out the crc first.

Add new helper functions to drive receiving into the destinations
provided by the sparse_read state machine.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
Jeff Layton
2022-03-24 13:33:06 -04:00
committed by Ilya Dryomov
parent f36217e35c
commit d396f89db3
2 changed files with 94 additions and 8 deletions
+4
View File
@@ -336,6 +336,10 @@ struct ceph_connection_v1_info {
int in_base_pos; /* bytes read */
/* sparse reads */
struct kvec in_sr_kvec; /* current location to receive into */
u64 in_sr_len; /* amount of data in this extent */
/* message in temps */
u8 in_tag; /* protocol control byte */
struct ceph_msg_header in_hdr;