From 03507db631c94a48e316c7f638ffb2991544d617 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 27 Aug 2013 14:45:46 -0700 Subject: [PATCH] rbd: fix buffer size for writes to images with snapshots rbd_osd_req_create() needs to know the snapshot context size to create a buffer large enough to send it with the message front. It gets this from the img_request, which was not set for the obj_request yet. This resulted in trying to write past the end of the front payload, hitting this BUG: libceph: BUG_ON(p > msg->front.iov_base + msg->front.iov_len); Fix this by associating the obj_request with its img_request immediately after it's created, before the osd request is created. Fixes: http://tracker.ceph.com/issues/5760 Suggested-by: Alex Elder Signed-off-by: Josh Durgin Reviewed-by: Alex Elder --- Reading git-format-patch failed