libceph: bump CEPH_OSD_MAX_OP to 3
authorIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 25 Feb 2014 14:22:27 +0000 (16:22 +0200)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 02:33:52 +0000 (10:33 +0800)
Our longest osd request now contains 3 ops: copyup+hint+write.

Also, CEPH_OSD_MAX_OP value in a BUG_ON in rbd_osd_req_callback() was
hard-coded to 2.  Fix it, and switch to rbd_assert while at it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c
include/linux/ceph/osd_client.h

index b55b7812cf93ee20874d975368906a80071486c0..4c612c4041b67df249c031a94be606525fc68bea 100644 (file)
@@ -1654,7 +1654,7 @@ static void rbd_osd_req_callback(struct ceph_osd_request *osd_req,
        if (osd_req->r_result < 0)
                obj_request->result = osd_req->r_result;
 
-       BUG_ON(osd_req->r_num_ops > 2);
+       rbd_assert(osd_req->r_num_ops <= CEPH_OSD_MAX_OP);
 
        /*
         * We support a 64-bit length, but ultimately it has to be
index c42d1ada685f188b51d54ed8795beaead24e70de..94ec69672164c9dd84b41c1ab3a7c995a761c1fc 100644 (file)
@@ -43,7 +43,7 @@ struct ceph_osd {
 };
 
 
-#define CEPH_OSD_MAX_OP        2
+#define CEPH_OSD_MAX_OP        3
 
 enum ceph_osd_data_type {
        CEPH_OSD_DATA_TYPE_NONE = 0,