]> Pileus Git - ~andy/linux/commit
rbd: fix parent request size assumption
authorAlex Elder <elder@inktank.com>
Fri, 10 May 2013 21:29:22 +0000 (16:29 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 13 May 2013 19:09:01 +0000 (14:09 -0500)
commitebda6408f2227a774343c3cc2861384942143ff3
tree557776350c36146f227651ca5797196ed972e138
parentc10ebbf55b40503a46fb8b29824c9ca1ca089826
rbd: fix parent request size assumption

The code that reads object data from the parent for a copyup on
write request currently assumes that the size of that request is the
size of a "full" object from the original target image.

That is not necessarily the case.  The parent overlap could reduce
the request size below that.  To fix that assumption we need to
record the number of pages in the copyup_pages array, for both an
image request and an object request.  Rename a local variable in
rbd_img_obj_parent_read_full_callback() to reflect we're recording
the length of the parent read request, not the size of the target
object.

This resolves:
    http://tracker.ceph.com/issues/5038

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c