summaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger_v2.c
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2024-03-06 02:05:44 +0100
committerIlya Dryomov <idryomov@gmail.com>2024-03-06 12:43:01 +0100
commit321e3c3de53c7530cd518219d01f04e7e32a9d23 (patch)
tree1aa231fd7616bfc779b647c3644658f598399730 /net/ceph/messenger_v2.c
parentLinux 6.8-rc7 (diff)
downloadlinux-321e3c3de53c7530cd518219d01f04e7e32a9d23.tar.xz
linux-321e3c3de53c7530cd518219d01f04e7e32a9d23.zip
libceph: init the cursor when preparing sparse read in msgr2
The cursor is no longer initialized in the OSD client, causing the sparse read state machine to fall into an infinite loop. The cursor should be initialized in IN_S_PREPARE_SPARSE_DATA state. [ idryomov: use msg instead of con->in_msg, changelog ] Link: https://tracker.ceph.com/issues/64607 Fixes: 8e46a2d068c9 ("libceph: just wait for more data to be available on the socket") Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Tested-by: Luis Henriques <lhenriques@suse.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/messenger_v2.c')
-rw-r--r--net/ceph/messenger_v2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c
index a0ca5414b333..bd608ffa0627 100644
--- a/net/ceph/messenger_v2.c
+++ b/net/ceph/messenger_v2.c
@@ -2034,6 +2034,9 @@ static int prepare_sparse_read_data(struct ceph_connection *con)
if (!con_secure(con))
con->in_data_crc = -1;
+ ceph_msg_data_cursor_init(&con->v2.in_cursor, msg,
+ msg->sparse_read_total);
+
reset_in_kvecs(con);
con->v2.in_state = IN_S_PREPARE_SPARSE_DATA_CONT;
con->v2.data_len_remain = data_len(msg);