aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-01-08 16:58:34 -0500
committerSage Weil <sage@newdream.net>2010-01-25 15:57:37 -0500
commit2450418c47b7998ad55a73f23707b1e21c371eef (patch)
tree1e17dd88f86c5daa1bfbca1aeea0c909391b5829 /fs/ceph/messenger.h
parent5b1daecd59f95eb24dc629407ed80369c9929520 (diff)
ceph: allocate middle of message before stating to read
Both front and middle parts of the message are now being allocated at the ceph_alloc_msg(). Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'fs/ceph/messenger.h')
-rw-r--r--fs/ceph/messenger.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h
index a7b684145092..b6bec59056d7 100644
--- a/fs/ceph/messenger.h
+++ b/fs/ceph/messenger.h
@@ -44,9 +44,8 @@ struct ceph_connection_operations {
44 void (*peer_reset) (struct ceph_connection *con); 44 void (*peer_reset) (struct ceph_connection *con);
45 45
46 struct ceph_msg * (*alloc_msg) (struct ceph_connection *con, 46 struct ceph_msg * (*alloc_msg) (struct ceph_connection *con,
47 struct ceph_msg_header *hdr); 47 struct ceph_msg_header *hdr,
48 int (*alloc_middle) (struct ceph_connection *con, 48 int *skip);
49 struct ceph_msg *msg);
50 /* an incoming message has a data payload; tell me what pages I 49 /* an incoming message has a data payload; tell me what pages I
51 * should read the data into. */ 50 * should read the data into. */
52 int (*prepare_pages) (struct ceph_connection *con, struct ceph_msg *m, 51 int (*prepare_pages) (struct ceph_connection *con, struct ceph_msg *m,
@@ -242,10 +241,6 @@ extern struct ceph_msg *ceph_msg_new(int type, int front_len,
242 struct page **pages); 241 struct page **pages);
243extern void ceph_msg_kfree(struct ceph_msg *m); 242extern void ceph_msg_kfree(struct ceph_msg *m);
244 243
245extern struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con,
246 struct ceph_msg_header *hdr);
247extern int ceph_alloc_middle(struct ceph_connection *con, struct ceph_msg *msg);
248
249 244
250static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg) 245static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg)
251{ 246{