Skip to content

Commit bd2931b

Browse files
committed
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
2 parents 63edbce + d2d1f17 commit bd2931b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/block/rbd.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,13 +2252,17 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request,
22522252
obj_request->pages, length,
22532253
offset & ~PAGE_MASK, false, false);
22542254

2255+
/*
2256+
* set obj_request->img_request before formatting
2257+
* the osd_request so that it gets the right snapc
2258+
*/
2259+
rbd_img_obj_request_add(img_request, obj_request);
22552260
if (write_request)
22562261
rbd_osd_req_format_write(obj_request);
22572262
else
22582263
rbd_osd_req_format_read(obj_request);
22592264

22602265
obj_request->img_offset = img_offset;
2261-
rbd_img_obj_request_add(img_request, obj_request);
22622266

22632267
img_offset += length;
22642268
resid -= length;

0 commit comments

Comments
 (0)