void **buf, int *len, int *proto,
void **reply_buf, int *reply_len, int force_new);
int (*verify_authorizer_reply) (struct ceph_connection *con, int len);
+ int (*invalidate_authorizer)(struct ceph_connection *con);
/* protocol version mismatch */
void (*bad_proto) (struct ceph_connection *con);
void (*peer_reset) (struct ceph_connection *con);
struct ceph_msg * (*alloc_msg) (struct ceph_connection *con,
- struct ceph_msg_header *hdr);
- int (*alloc_middle) (struct ceph_connection *con,
- struct ceph_msg *msg);
- /* an incoming message has a data payload; tell me what pages I
- * should read the data into. */
- int (*prepare_pages) (struct ceph_connection *con, struct ceph_msg *m,
- int want);
+ struct ceph_msg_header *hdr,
+ int *skip);
};
extern const char *ceph_name_type_str(int t);
struct ceph_buffer *middle;
struct page **pages; /* data payload. NOT OWNER. */
unsigned nr_pages; /* size of page array */
+ struct ceph_pagelist *pagelist; /* instead of pages */
struct list_head list_head;
struct kref kref;
bool front_is_vmalloc;
bool more_to_follow;
+ bool needs_out_seq;
int front_max;
struct ceph_msgpool *pool;
* state with the peer. */
#define CLOSED 10 /* we've closed the connection */
#define SOCK_CLOSED 11 /* socket state changed to closed */
-#define REGISTERED 12 /* connection appears in con_tree */
#define OPENING 13 /* open connection w/ (possibly new) peer */
#define DEAD 14 /* dead, about to kfree */
void *auth_reply_buf; /* where to put the authorizer reply */
int auth_reply_buf_len;
+ struct mutex mutex;
+
/* out queue */
- struct mutex out_mutex;
struct list_head out_queue;
struct list_head out_sent; /* sending or sent but unacked */
u64 out_seq; /* last message queued for send */
/* message out temps */
struct ceph_msg *out_msg; /* sending message (== tail of
out_sent) */
+ bool out_msg_done;
struct ceph_msg_pos out_msg_pos;
struct kvec out_kvec[8], /* sending header/footer data */
struct ceph_connection *con);
extern void ceph_con_open(struct ceph_connection *con,
struct ceph_entity_addr *addr);
+extern bool ceph_con_opened(struct ceph_connection *con);
extern void ceph_con_close(struct ceph_connection *con);
extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg);
extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg);
+extern void ceph_con_revoke_message(struct ceph_connection *con,
+ struct ceph_msg *msg);
extern void ceph_con_keepalive(struct ceph_connection *con);
extern struct ceph_connection *ceph_con_get(struct ceph_connection *con);
extern void ceph_con_put(struct ceph_connection *con);
struct page **pages);
extern void ceph_msg_kfree(struct ceph_msg *m);
-extern struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con,
- struct ceph_msg_header *hdr);
-extern int ceph_alloc_middle(struct ceph_connection *con, struct ceph_msg *msg);
-
static inline struct ceph_msg *ceph_msg_get(struct ceph_msg *msg)
{
kref_put(&msg->kref, ceph_msg_last_put);
}
+extern void ceph_msg_dump(struct ceph_msg *msg);
+
#endif