Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331676
b: refs/heads/master
c: f8d4de6
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder committed Oct 1, 2012
1 parent c01ff2f commit c32cc88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cb4a687c72bd16c95f514933d68884eacac4e4e
refs/heads/master: f8d4de6e1c939d56f1ee0a21ad677401846f990c
19 changes: 11 additions & 8 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,8 @@ static int rbd_req_sync_op(struct rbd_device *rbd_dev,
int flags,
struct ceph_osd_req_op *ops,
const char *object_name,
u64 ofs, u64 len,
char *buf,
u64 ofs, u64 inbound_size,
char *inbound,
struct ceph_osd_request **linger_req,
u64 *ver)
{
Expand All @@ -1109,13 +1109,13 @@ static int rbd_req_sync_op(struct rbd_device *rbd_dev,

rbd_assert(ops != NULL);

num_pages = calc_pages_for(ofs , len);
num_pages = calc_pages_for(ofs, inbound_size);
pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
if (IS_ERR(pages))
return PTR_ERR(pages);

ret = rbd_do_request(NULL, rbd_dev, snapc, snapid,
object_name, ofs, len, NULL,
object_name, ofs, inbound_size, NULL,
pages, num_pages,
flags,
ops,
Expand All @@ -1125,8 +1125,8 @@ static int rbd_req_sync_op(struct rbd_device *rbd_dev,
if (ret < 0)
goto done;

if ((flags & CEPH_OSD_FLAG_READ) && buf)
ret = ceph_copy_from_page_vector(pages, buf, ofs, ret);
if ((flags & CEPH_OSD_FLAG_READ) && inbound)
ret = ceph_copy_from_page_vector(pages, inbound, ofs, ret);

done:
ceph_release_page_vector(pages, num_pages);
Expand Down Expand Up @@ -1445,6 +1445,8 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev,
const char *method_name,
const char *outbound,
size_t outbound_size,
char *inbound,
size_t inbound_size,
int flags,
u64 *ver)
{
Expand Down Expand Up @@ -1478,7 +1480,8 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev,
ret = rbd_req_sync_op(rbd_dev, NULL,
CEPH_NOSNAP,
flags, ops,
object_name, 0, 0, NULL, NULL, ver);
object_name, 0, inbound_size, inbound,
NULL, ver);

rbd_destroy_ops(ops);

Expand Down Expand Up @@ -1789,7 +1792,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev,

ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "snap_add",
data, (size_t) (p - data),
data, (size_t) (p - data), NULL, 0,
CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK,
NULL);

Expand Down

0 comments on commit c32cc88

Please sign in to comment.