rbd: don't release write request until necessary
authorAlex Elder <elder@inktank.com>
Thu, 9 May 2013 15:08:49 +0000 (10:08 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 13 May 2013 20:06:43 +0000 (15:06 -0500)
commit8785b1d487f0a31afd2c802499786d3b355eccea
treea30281d04255ff1077997cb42a0ab85dcbfd8be6
parent642a25375f4c863607d2170f4471aec8becf7788
rbd: don't release write request until necessary

Previously when a layered write was going to involve a copyup
request, the original osd request was released before submitting the
parent full-object read.  The osd request for the copyup would then
be allocated in rbd_img_obj_parent_read_full_callback().

Shortly we will be handling the event of mapped layered images
getting flattened, and when that occurs we need to resubmit the
original request.  We therefore don't want to release the osd
request until we really konw we're going to replace it--in the
callback function.

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