diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-01-08 16:58:34 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-01-25 15:57:37 -0500 |
commit | 2450418c47b7998ad55a73f23707b1e21c371eef (patch) | |
tree | 1e17dd88f86c5daa1bfbca1aeea0c909391b5829 /fs/ceph/messenger.h | |
parent | 5b1daecd59f95eb24dc629407ed80369c9929520 (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.h | 9 |
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); |
243 | extern void ceph_msg_kfree(struct ceph_msg *m); | 242 | extern void ceph_msg_kfree(struct ceph_msg *m); |
244 | 243 | ||
245 | extern struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con, | ||
246 | struct ceph_msg_header *hdr); | ||
247 | extern int ceph_alloc_middle(struct ceph_connection *con, struct ceph_msg *msg); | ||
248 | |||
249 | 244 | ||
250 | static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg) | 245 | static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg) |
251 | { | 246 | { |