aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-01 18:26:41 -0500
committerSage Weil <sage@newdream.net>2010-03-01 18:26:41 -0500
commit6f863e712d4114e8ae2f02de64ebeac0546ebaa0 (patch)
tree0a61ce00922aa3670f53f44f7ae5ec2ad19c6c90 /fs/ceph/osd_client.c
parent3ca02ef96e119d36bc1752baeae7dd0c59c2f325 (diff)
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 <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osd_client.c')
-rw-r--r--fs/ceph/osd_client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c
index ffe1f4064ccd..c4763bff97b4 100644
--- a/fs/ceph/osd_client.c
+++ b/fs/ceph/osd_client.c
@@ -228,6 +228,9 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
228 } 228 }
229 229
230 BUG_ON(p > msg->front.iov_base + msg->front.iov_len); 230 BUG_ON(p > msg->front.iov_base + msg->front.iov_len);
231 msg_size = p - msg->front.iov_base;
232 msg->front.iov_len = msg_size;
233 msg->hdr.front_len = cpu_to_le32(msg_size);
231 return req; 234 return req;
232} 235}
233 236