From c44a14aae0685a4765c5008df1470e6e1fef3a9b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 1 Mar 2010 15:26:41 -0800 Subject: [PATCH] ceph: set osd request message front length correctly We didn't set the front length correctly. When messages used the message pool we ended up with the conservative max (4 KB), and the rest of the time the slightly less conservative estimate. Even though the OSD ignores the extra data, set it to the right value to avoid sending extra data over the network. Signed-off-by: Yehuda Sadeh Signed-off-by: Sage Weil --- fs/ceph/osd_client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index fa0f73703954..104e8f14e960 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c @@ -288,6 +288,9 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, } BUG_ON(p > msg->front.iov_base + msg->front.iov_len); + msg_size = p - msg->front.iov_base; + msg->front.iov_len = msg_size; + msg->hdr.front_len = cpu_to_le32(msg_size); return req; } -- 2.47.3