summary refs log tree commit diff
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-07-15 20:11:34 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-07-15 20:11:34 -0600
commit8c11642a50555e584774737f7c296f9aece310cf (patch)
tree1ff8dfaf05479593ef2c50378a68dfc6aec495a5 /net/ceph/osd_client.c
parent5d10302f46df1d9a85c34ea97f9b6c29e414482e (diff)
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
downloadlinux-8c11642a50555e584774737f7c296f9aece310cf.tar.gz
Merge commit 'v3.0-rc7' into devicetree/next
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 9cb627a4073a..7330c2757c0c 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -477,8 +477,9 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc,
 	calc_layout(osdc, vino, layout, off, plen, req, ops);
 	req->r_file_layout = *layout;  /* keep a copy */
 
-	/* in case it differs from natural alignment that calc_layout
-	   filled in for us */
+	/* in case it differs from natural (file) alignment that
+	   calc_layout filled in for us */
+	req->r_num_pages = calc_pages_for(page_align, *plen);
 	req->r_page_alignment = page_align;
 
 	ceph_osdc_build_request(req, off, plen, ops,
@@ -2027,8 +2028,9 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
 		int want = calc_pages_for(req->r_page_alignment, data_len);
 
 		if (unlikely(req->r_num_pages < want)) {
-			pr_warning("tid %lld reply %d > expected %d pages\n",
-				   tid, want, m->nr_pages);
+			pr_warning("tid %lld reply has %d bytes %d pages, we"
+				   " had only %d pages ready\n", tid, data_len,
+				   want, req->r_num_pages);
 			*skip = 1;
 			ceph_msg_put(m);
 			m = NULL;