Skip to content

Commit 26c907b

Browse files
lxbszgregkh
authored andcommitted
libceph: init the cursor when preparing sparse read in msgr2
[ Upstream commit 321e3c3 ] 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: 8e46a2d ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent fb90d97 commit 26c907b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ceph/messenger_v2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,9 @@ static int prepare_sparse_read_data(struct ceph_connection *con)
20382038
if (!con_secure(con))
20392039
con->in_data_crc = -1;
20402040

2041+
ceph_msg_data_cursor_init(&con->v2.in_cursor, msg,
2042+
msg->sparse_read_total);
2043+
20412044
reset_in_kvecs(con);
20422045
con->v2.in_state = IN_S_PREPARE_SPARSE_DATA_CONT;
20432046
con->v2.data_len_remain = data_len(msg);

0 commit comments

Comments
 (0)