1 #ifndef _FS_CEPH_MSGPOOL
2 #define _FS_CEPH_MSGPOOL
4 #include <linux/mempool.h>
8 * we use memory pools for preallocating messages we may receive, to
9 * avoid unexpected OOM conditions.
13 int front_len; /* preallocated payload size */
16 extern int ceph_msgpool_init(struct ceph_msgpool *pool,
17 int front_len, int size, bool blocking);
18 extern void ceph_msgpool_destroy(struct ceph_msgpool *pool);
19 extern struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *,
21 extern void ceph_msgpool_put(struct ceph_msgpool *, struct ceph_msg *);