|
@@ -2203,6 +2203,11 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request,
|
|
|
rbd_segment_name_free(object_name);
|
|
|
if (!obj_request)
|
|
|
goto out_unwind;
|
|
|
+ /*
|
|
|
+ * set obj_request->img_request before creating the
|
|
|
+ * osd_request so that it gets the right snapc
|
|
|
+ */
|
|
|
+ rbd_img_obj_request_add(img_request, obj_request);
|
|
|
|
|
|
if (type == OBJ_REQUEST_BIO) {
|
|
|
unsigned int clone_size;
|
|
@@ -2244,11 +2249,6 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request,
|
|
|
obj_request->pages, length,
|
|
|
offset & ~PAGE_MASK, false, false);
|
|
|
|
|
|
- /*
|
|
|
- * set obj_request->img_request before formatting
|
|
|
- * the osd_request so that it gets the right snapc
|
|
|
- */
|
|
|
- rbd_img_obj_request_add(img_request, obj_request);
|
|
|
if (write_request)
|
|
|
rbd_osd_req_format_write(obj_request);
|
|
|
else
|