summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-27 14:15:51 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 00:36:21 +0200
commit13d1ad16d05eebb4db977eb955716b9da2c19fbd (patch)
treed48af8a4ae4ce0cc9407b7c72376dc518fbceea3 /include
parent841272825b2263174120ab02b4abac9005ee1420 (diff)
libceph: move message allocation out of ceph_osdc_alloc_request()
The size of ->r_request and ->r_reply messages depends on the size of the object name (ceph_object_id), while the size of ceph_osd_request is fixed. Move message allocation into a separate function that would have to be called after ceph_object_id and ceph_object_locator (which is also going to become variable in size with RADOS namespaces) have been filled in: req = ceph_osdc_alloc_request(...); <fill in req->r_base_oid> <fill in req->r_base_oloc> ceph_osdc_alloc_messages(req); Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/osd_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index cbf460927c42..66a1fcd5bff7 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -322,6 +322,7 @@ extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *
unsigned int num_ops,
bool use_mempool,
gfp_t gfp_flags);
+int ceph_osdc_alloc_messages(struct ceph_osd_request *req, gfp_t gfp);
extern void ceph_osdc_build_request(struct ceph_osd_request *req, u64 off,
struct ceph_snap_context *snapc,