]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
libceph: osd_req_op_cls_init() doesn't need to take opcode
authorIlya Dryomov <idryomov@gmail.com>
Wed, 26 Sep 2018 17:12:07 +0000 (19:12 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 22 Oct 2018 08:28:20 +0000 (10:28 +0200)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c

index f2fe692dda40485d282541680b20f8fdc85f256f..9cc7ee3b427fa8e1e6d4ef7541c909de5ad4ff65 100644 (file)
@@ -2374,8 +2374,7 @@ static int rbd_obj_issue_copyup(struct rbd_obj_request *obj_req, u32 bytes)
        if (!obj_req->osd_req)
                return -ENOMEM;
 
-       ret = osd_req_op_cls_init(obj_req->osd_req, 0, CEPH_OSD_OP_CALL, "rbd",
-                                 "copyup");
+       ret = osd_req_op_cls_init(obj_req->osd_req, 0, "rbd", "copyup");
        if (ret)
                return ret;
 
index 02096da01845c992d5b8217a9291337fed3ff6cd..f3e828460c91cba2ab572587e0e9dcc677e95edf 100644 (file)
@@ -444,9 +444,8 @@ extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *,
                                        struct page **pages, u64 length,
                                        u32 alignment, bool pages_from_pool,
                                        bool own_pages);
-extern int osd_req_op_cls_init(struct ceph_osd_request *osd_req,
-                                       unsigned int which, u16 opcode,
-                                       const char *class, const char *method);
+int osd_req_op_cls_init(struct ceph_osd_request *osd_req, unsigned int which,
+                       const char *class, const char *method);
 extern int osd_req_op_xattr_init(struct ceph_osd_request *osd_req, unsigned int which,
                                 u16 opcode, const char *name, const void *value,
                                 size_t size, u8 cmp_op, u8 cmp_mode);
index 60934bd8796c53c5ec96477e1c29fb9e8234e804..a871b234cd907fac257e9857936a010bbfba6683 100644 (file)
@@ -767,15 +767,14 @@ void osd_req_op_extent_dup_last(struct ceph_osd_request *osd_req,
 EXPORT_SYMBOL(osd_req_op_extent_dup_last);
 
 int osd_req_op_cls_init(struct ceph_osd_request *osd_req, unsigned int which,
-                       u16 opcode, const char *class, const char *method)
+                       const char *class, const char *method)
 {
-       struct ceph_osd_req_op *op = _osd_req_op_init(osd_req, which,
-                                                     opcode, 0);
+       struct ceph_osd_req_op *op;
        struct ceph_pagelist *pagelist;
        size_t payload_len = 0;
        size_t size;
 
-       BUG_ON(opcode != CEPH_OSD_OP_CALL);
+       op = _osd_req_op_init(osd_req, which, CEPH_OSD_OP_CALL, 0);
 
        pagelist = kmalloc(sizeof (*pagelist), GFP_NOFS);
        if (!pagelist)
@@ -4962,7 +4961,7 @@ int ceph_osdc_call(struct ceph_osd_client *osdc,
        if (ret)
                goto out_put_req;
 
-       ret = osd_req_op_cls_init(req, 0, CEPH_OSD_OP_CALL, class, method);
+       ret = osd_req_op_cls_init(req, 0, class, method);
        if (ret)
                goto out_put_req;