1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _FS_CEPH_MSGPOOL
3 #define _FS_CEPH_MSGPOOL
5 #include <linux/mempool.h>
8 * we use memory pools for preallocating messages we may receive, to
9 * avoid unexpected OOM conditions.
14 int type; /* preallocated message type */
15 int front_len; /* preallocated payload size */
19 int ceph_msgpool_init(struct ceph_msgpool *pool, int type,
20 int front_len, int max_data_items, int size,
22 extern void ceph_msgpool_destroy(struct ceph_msgpool *pool);
23 struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *pool, int front_len,
25 extern void ceph_msgpool_put(struct ceph_msgpool *, struct ceph_msg *);