From a4d6daf53e9a46f34b4ba5cc51f8d9a3ab6edcae Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Fri, 10 Jun 2016 02:15:45 +0200
Subject: [PATCH] rbd: handle OBJ_REQUEST_SG types for copyup
Patch-mainline: Not yet, SES clustered LIO/RBD
References: bsc#983394
When handling an LIO layered write with cloned parent overlap,
rbd_osd_copyup_callback() can be invoked with an OBJ_REQUEST_SG type.
rbd_osd_copyup_callback() handles the release of the copyup page vector,
and triggers regular OSD/RBD image request cleanup, so OBJ_REQUEST_SG
types should be accepted here.
This bug was introduced with rbd scatterlist support via suse-commit
78f11929850b38b6d39f47786bff086d3813a6fa.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
drivers/block/rbd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2625,7 +2625,8 @@ rbd_osd_copyup_callback(struct rbd_obj_r
dout("%s: obj %p\n", __func__, obj_request);
rbd_assert(obj_request->type == OBJ_REQUEST_BIO ||
- obj_request->type == OBJ_REQUEST_NODATA);
+ obj_request->type == OBJ_REQUEST_NODATA ||
+ obj_request->type == OBJ_REQUEST_SG);
rbd_assert(obj_request_img_data_test(obj_request));
img_request = obj_request->img_request;
rbd_assert(img_request);