aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@redhat.com>2014-11-21 14:16:43 -0500
committerIlya Dryomov <idryomov@redhat.com>2014-12-17 12:09:51 -0500
commit7e868b6eff21edb59eb6a723dfd18761476ddb46 (patch)
treef9e566cd5ab2f4b6a30e391abe1ddd1b1923581a /drivers/block
parentca3995ad13b5e8bb08be850d08fe1e2abffc0206 (diff)
rbd: don't treat CEPH_OSD_OP_DELETE as extent op
CEPH_OSD_OP_DELETE is not an extent op, stop treating it as such. This sneaked in with discard patches - it's one of the three osd ops (the other two are CEPH_OSD_OP_TRUNCATE and CEPH_OSD_OP_ZERO) that discard is implemented with. Signed-off-by: Ilya Dryomov <idryomov@redhat.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 3c34ab55537c..3ec85dfce124 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2370,8 +2370,12 @@ static void rbd_img_obj_request_fill(struct rbd_obj_request *obj_request,
2370 opcode = CEPH_OSD_OP_READ; 2370 opcode = CEPH_OSD_OP_READ;
2371 } 2371 }
2372 2372
2373 osd_req_op_extent_init(osd_request, num_ops, opcode, offset, length, 2373 if (opcode == CEPH_OSD_OP_DELETE)
2374 0, 0); 2374 osd_req_op_init(osd_request, num_ops, opcode);
2375 else
2376 osd_req_op_extent_init(osd_request, num_ops, opcode,
2377 offset, length, 0, 0);
2378
2375 if (obj_request->type == OBJ_REQUEST_BIO) 2379 if (obj_request->type == OBJ_REQUEST_BIO)
2376 osd_req_op_extent_osd_data_bio(osd_request, num_ops, 2380 osd_req_op_extent_osd_data_bio(osd_request, num_ops,
2377 obj_request->bio_list, length); 2381 obj_request->bio_list, length);