Skip to content

Commit ee97302

Browse files
lxbszidryomov
authored andcommitted
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>
1 parent cd7d469 commit ee97302

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/ceph/messenger_v1.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ static inline int read_partial_message_section(struct ceph_connection *con,
991991
return read_partial_message_chunk(con, section, sec_len, crc);
992992
}
993993

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)
995995
{
996996
struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor;
997997
bool do_bounce = ceph_test_opt(from_msgr(con->msgr), RXBOUNCE);
@@ -1026,7 +1026,7 @@ static int read_sparse_msg_extent(struct ceph_connection *con, u32 *crc)
10261026
return 1;
10271027
}
10281028

1029-
static int read_sparse_msg_data(struct ceph_connection *con)
1029+
static int read_partial_sparse_msg_data(struct ceph_connection *con)
10301030
{
10311031
struct ceph_msg_data_cursor *cursor = &con->in_msg->cursor;
10321032
bool do_datacrc = !ceph_test_opt(from_msgr(con->msgr), NOCRC);
@@ -1043,7 +1043,7 @@ static int read_sparse_msg_data(struct ceph_connection *con)
10431043
con->v1.in_sr_len,
10441044
&crc);
10451045
else if (cursor->sr_resid > 0)
1046-
ret = read_sparse_msg_extent(con, &crc);
1046+
ret = read_partial_sparse_msg_extent(con, &crc);
10471047

10481048
if (ret <= 0) {
10491049
if (do_datacrc)
@@ -1254,7 +1254,7 @@ static int read_partial_message(struct ceph_connection *con)
12541254
return -EIO;
12551255

12561256
if (m->sparse_read)
1257-
ret = read_sparse_msg_data(con);
1257+
ret = read_partial_sparse_msg_data(con);
12581258
else if (ceph_test_opt(from_msgr(con->msgr), RXBOUNCE))
12591259
ret = read_partial_msg_data_bounce(con);
12601260
else

0 commit comments

Comments
 (0)