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>
This commit is contained in:
parent
98fa5dd883
commit
6010a451c3
1 changed files with 6 additions and 7 deletions
|
@ -1840,12 +1840,11 @@ static int rbd_obj_method_sync(struct rbd_device *rbd_dev,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Method calls are ultimately read operations but they
|
* Method calls are ultimately read operations. The result
|
||||||
* don't involve object data (so no offset or length).
|
* should placed into the inbound buffer provided. They
|
||||||
* The result should placed into the inbound buffer
|
* also supply outbound data--parameters for the object
|
||||||
* provided. They also supply outbound data--parameters for
|
* method. Currently if this is present it will be a
|
||||||
* the object method. Currently if this is present it will
|
* snapshot id.
|
||||||
* be a snapshot id.
|
|
||||||
*/
|
*/
|
||||||
page_count = (u32) calc_pages_for(0, inbound_size);
|
page_count = (u32) calc_pages_for(0, inbound_size);
|
||||||
pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
|
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);
|
return PTR_ERR(pages);
|
||||||
|
|
||||||
ret = -ENOMEM;
|
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);
|
OBJ_REQUEST_PAGES);
|
||||||
if (!obj_request)
|
if (!obj_request)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Reference in a new issue