summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-04-05 08:27:11 +0200
committerSage Weil <sage@inktank.com>2013-05-02 06:18:04 +0200
commit6010a451c38b04cf10808a508f33e5bf32e7de63 (patch)
tree02047e0ed698b6d2b3211570f2a2d8590dd27df7 /drivers
parentlibceph: provide data length when preparing message (diff)
downloadlinux-6010a451c38b04cf10808a508f33e5bf32e7de63.tar.xz
linux-6010a451c38b04cf10808a508f33e5bf32e7de63.zip
rbd: define inbound data size for method ops
When rbd creates an object request containing an object method call operation it is passing 0 for the size. I originally thought this was because the length was not needed for method calls, but I think it really should be supplied, to describe how much space is available to receive response data. So provide the supplied length. This resolves: http://tracker.ceph.com/issues/4659 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index e95a92e89330..afbc9f6f8ff1 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1840,12 +1840,11 @@ static int rbd_obj_method_sync(struct rbd_device *rbd_dev,
int ret;
/*
- * Method calls are ultimately read operations but they
- * don't involve object data (so no offset or length).
- * The result should placed into the inbound buffer
- * provided. They also supply outbound data--parameters for
- * the object method. Currently if this is present it will
- * be a snapshot id.
+ * Method calls are ultimately read operations. The result
+ * should placed into the inbound buffer provided. They
+ * also supply outbound data--parameters for the object
+ * method. Currently if this is present it will be a
+ * snapshot id.
*/
page_count = (u32) calc_pages_for(0, inbound_size);
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
@@ -1853,7 +1852,7 @@ static int rbd_obj_method_sync(struct rbd_device *rbd_dev,
return PTR_ERR(pages);
ret = -ENOMEM;
- obj_request = rbd_obj_request_create(object_name, 0, 0,
+ obj_request = rbd_obj_request_create(object_name, 0, inbound_size,
OBJ_REQUEST_PAGES);
if (!obj_request)
goto out;