summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-29 10:31:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-29 10:31:15 -0700
commitbd2931b5cff6a3bf39bfe15fae051fb8229c0029 (patch)
tree2d550ed8e2635067796c09faa9134887cab46e84 /drivers
parent63edbce160c6d68c806e58db026b5881c6010e04 (diff)
parentd2d1f17a0dad823a4cb71583433d26cd7f734e08 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fix from Sage Weil: "This is a recently spotted regression in the snapshot behavior... It turns out several tests weren't being run in the nightlies so this took a while to spot" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: send snapshot context with writes
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 247bf309973..aff789d6fcc 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2252,13 +2252,17 @@ 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
rbd_osd_req_format_read(obj_request);
obj_request->img_offset = img_offset;
- rbd_img_obj_request_add(img_request, obj_request);
img_offset += length;
resid -= length;