aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-03-11 23:34:22 -0500
committerSage Weil <sage@inktank.com>2013-05-01 21:17:28 -0700
commit61fcdc97c06bce7b6d16dd2a6b478f24cd121d96 (patch)
tree6bc1d9f5b9242ae1fcf7c00bcb498492619a4f45 /net/ceph/messenger.c
parent878efabd3236abaedd0a4539bbb248ac69fed115 (diff)
libceph: no outbound zero data
There is handling in write_partial_message_data() for the case where only the length of--and no other information about--the data to be sent has been specified. It uses the zero page as the source of data to send in this case. This case doesn't occur. All message senders set up a page array, pagelist, or bio describing the data to be sent. So eliminate the block of code that handles this (but check and issue a warning for now, just in case it happens for some reason). This resolves: http://tracker.ceph.com/issues/4426 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index f81fbce136f8..598d21830417 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1512,13 +1512,10 @@ static int write_partial_message_data(struct ceph_connection *con)
&length, &last_piece);
#endif
} else {
- size_t resid = data_len - msg_pos->data_pos;
-
- page = zero_page;
- page_offset = msg_pos->page_pos;
- length = PAGE_SIZE - page_offset;
- length = min(resid, length);
- last_piece = length == resid;
+ WARN(1, "con %p data_len %u but no outbound data\n",
+ con, data_len);
+ ret = -EINVAL;
+ goto out;
}
if (do_datacrc && !msg_pos->did_page_crc) {
u32 crc = le32_to_cpu(msg->footer.data_crc);

Privacy Policy