libceph: support pages for class request data
authorAlex Elder <elder@inktank.com>
Fri, 19 Apr 2013 20:34:49 +0000 (15:34 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:06 +0000 (21:19 -0700)
Add the ability to provide an array of pages as outbound request
data for object class method calls.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
include/linux/ceph/osd_client.h
net/ceph/osd_client.c

index 4d84a2b44f1820de5747f671e5f6908642ef1924..4191cd2c55e54a612aba6c17b317c45350dd7e0a 100644 (file)
@@ -273,6 +273,11 @@ extern void osd_req_op_extent_osd_data_bio(struct ceph_osd_request *,
 extern void osd_req_op_cls_request_data_pagelist(struct ceph_osd_request *,
                                        unsigned int which,
                                        struct ceph_pagelist *pagelist);
+extern void osd_req_op_cls_request_data_pages(struct ceph_osd_request *,
+                                       unsigned int which,
+                                       struct page **pages, u64 length,
+                                       u32 alignment, bool pages_from_pool,
+                                       bool own_pages);
 extern void osd_req_op_cls_response_data_pages(struct ceph_osd_request *,
                                        unsigned int which,
                                        struct page **pages, u64 length,
index c842e877d504adc1331238bbe0b578d2bea67e42..467020c560b245cf900f95f92d4f2f2d8b716d4e 100644 (file)
@@ -214,6 +214,18 @@ void osd_req_op_cls_request_data_pagelist(
 }
 EXPORT_SYMBOL(osd_req_op_cls_request_data_pagelist);
 
+void osd_req_op_cls_request_data_pages(struct ceph_osd_request *osd_req,
+                       unsigned int which, struct page **pages, u64 length,
+                       u32 alignment, bool pages_from_pool, bool own_pages)
+{
+       struct ceph_osd_data *osd_data;
+
+       osd_data = osd_req_op_data(osd_req, which, cls, request_data);
+       ceph_osd_data_pages_init(osd_data, pages, length, alignment,
+                               pages_from_pool, own_pages);
+}
+EXPORT_SYMBOL(osd_req_op_cls_request_data_pages);
+
 void osd_req_op_cls_response_data_pages(struct ceph_osd_request *osd_req,
                        unsigned int which, struct page **pages, u64 length,
                        u32 alignment, bool pages_from_pool, bool own_pages)