bool more_to_follow;
int front_max;
- struct ceph_msg_pool *pool;
+ struct ceph_msgpool *pool;
};
struct ceph_msg_pos {
struct ceph_connection *con;
/* msg pools */
- struct ceph_msg_pool msgpool_mount_ack;
- struct ceph_msg_pool msgpool_subscribe_ack;
- struct ceph_msg_pool msgpool_statfs_reply;
+ struct ceph_msgpool msgpool_mount_ack;
+ struct ceph_msgpool msgpool_subscribe_ack;
+ struct ceph_msgpool msgpool_statfs_reply;
/* pending statfs requests */
struct radix_tree_root statfs_request_tree;
/*
* Allocate or release as necessary to meet our target pool size.
*/
-static int __fill_msgpool(struct ceph_msg_pool *pool)
+static int __fill_msgpool(struct ceph_msgpool *pool)
{
struct ceph_msg *msg;
return 0;
}
-int ceph_msgpool_init(struct ceph_msg_pool *pool,
+int ceph_msgpool_init(struct ceph_msgpool *pool,
int front_len, int min, bool blocking)
{
int ret;
return ret;
}
-void ceph_msgpool_destroy(struct ceph_msg_pool *pool)
+void ceph_msgpool_destroy(struct ceph_msgpool *pool)
{
dout("msgpool_destroy %p\n", pool);
spin_lock(&pool->lock);
spin_unlock(&pool->lock);
}
-int ceph_msgpool_resv(struct ceph_msg_pool *pool, int delta)
+int ceph_msgpool_resv(struct ceph_msgpool *pool, int delta)
{
int ret;
return ret;
}
-struct ceph_msg *ceph_msgpool_get(struct ceph_msg_pool *pool)
+struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *pool)
{
wait_queue_t wait;
struct ceph_msg *msg;
}
}
-void ceph_msgpool_put(struct ceph_msg_pool *pool, struct ceph_msg *msg)
+void ceph_msgpool_put(struct ceph_msgpool *pool, struct ceph_msg *msg)
{
spin_lock(&pool->lock);
if (pool->num < pool->min) {
* we use memory pools for preallocating messages we may receive, to
* avoid unexpected OOM conditions.
*/
-struct ceph_msg_pool {
+struct ceph_msgpool {
spinlock_t lock;
int front_len; /* preallocated payload size */
struct list_head msgs; /* msgs in the pool; each has 1 ref */
wait_queue_head_t wait;
};
-extern int ceph_msgpool_init(struct ceph_msg_pool *pool,
+extern int ceph_msgpool_init(struct ceph_msgpool *pool,
int front_len, int size, bool blocking);
-extern void ceph_msgpool_destroy(struct ceph_msg_pool *pool);
-extern int ceph_msgpool_resv(struct ceph_msg_pool *, int delta);
-extern struct ceph_msg *ceph_msgpool_get(struct ceph_msg_pool *);
-extern void ceph_msgpool_put(struct ceph_msg_pool *, struct ceph_msg *);
+extern void ceph_msgpool_destroy(struct ceph_msgpool *pool);
+extern int ceph_msgpool_resv(struct ceph_msgpool *, int delta);
+extern struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *);
+extern void ceph_msgpool_put(struct ceph_msgpool *, struct ceph_msg *);
#endif
mempool_t *req_mempool;
- struct ceph_msg_pool msgpool_op;
- struct ceph_msg_pool msgpool_op_reply;
+ struct ceph_msgpool msgpool_op;
+ struct ceph_msgpool msgpool_op_reply;
};
extern int ceph_osdc_init(struct ceph_osd_client *osdc,