Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: rename read_sparse_msg_*() to read_partial_sparse_msg_*()

These functions are supposed to behave like other read_partial_*()
handlers: the contract with messenger v1 is that the handler bails if
the area of the message it's responsible for is already processed.
This comes up when handling short reads from the socket.

[ idryomov: changelog ]

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Xiubo Li and committed by
Ilya Dryomov
ee97302f cd7d469c

+4 -4
+4 -4
net/ceph/messenger_v1.c
··· 991 991 return read_partial_message_chunk(con, section, sec_len, crc); 992 992 } 993 993 994 - static int read_sparse_msg_extent(struct ceph_connection *con, u32 *crc) 994 + static int read_partial_sparse_msg_extent(struct ceph_connection *con, u32 *crc) 995 995 { 996 996 struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor; 997 997 bool do_bounce = ceph_test_opt(from_msgr(con->msgr), RXBOUNCE); ··· 1026 1026 return 1; 1027 1027 } 1028 1028 1029 - static int read_sparse_msg_data(struct ceph_connection *con) 1029 + static int read_partial_sparse_msg_data(struct ceph_connection *con) 1030 1030 { 1031 1031 struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor; 1032 1032 bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC); ··· 1043 1043 con->v1.in_sr_len, 1044 1044 &crc); 1045 1045 else if (cursor->sr_resid > 0) 1046 - ret = read_sparse_msg_extent(con, &crc); 1046 + ret = read_partial_sparse_msg_extent(con, &crc); 1047 1047 1048 1048 if (ret <= 0) { 1049 1049 if (do_datacrc) ··· 1254 1254 return -EIO; 1255 1255 1256 1256 if (m->sparse_read) 1257 - ret = read_sparse_msg_data(con); 1257 + ret = read_partial_sparse_msg_data(con); 1258 1258 else if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE)) 1259 1259 ret = read_partial_msg_data_bounce(con); 1260 1260 else