diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:38:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 15:38:28 -0400 |
| commit | 2017bd19454ea7cdae19922d15b6930f6c8088a2 (patch) | |
| tree | 53974657ab3a2c98f2da7b3fcb050ff5b697f876 /include/linux/ceph/msgpool.h | |
| parent | 9f1ad09493451c19d00c004da479acf699eeedd6 (diff) | |
| parent | efa4c1206eaff047c474af2136748a58eb8cc33b (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (22 commits)
ceph: do not carry i_lock for readdir from dcache
fs/ceph/xattr.c: Use kmemdup
rbd: passing wrong variable to bvec_kunmap_irq()
rbd: null vs ERR_PTR
ceph: fix num_pages_free accounting in pagelist
ceph: add CEPH_MDS_OP_SETDIRLAYOUT and associated ioctl.
ceph: don't crash when passed bad mount options
ceph: fix debugfs warnings
block: rbd: removing unnecessary test
block: rbd: fixed may leaks
ceph: switch from BKL to lock_flocks()
ceph: preallocate flock state without locks held
ceph: add pagelist_reserve, pagelist_truncate, pagelist_set_cursor
ceph: use mapping->nrpages to determine if mapping is empty
ceph: only invalidate on check_caps if we actually have pages
ceph: do not hide .snap in root directory
rbd: introduce rados block device (rbd), based on libceph
ceph: factor out libceph from Ceph file system
ceph-rbd: osdc support for osd call and rollback operations
ceph: messenger and osdc changes for rbd
...
Diffstat (limited to 'include/linux/ceph/msgpool.h')
| -rw-r--r-- | include/linux/ceph/msgpool.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/ceph/msgpool.h b/include/linux/ceph/msgpool.h new file mode 100644 index 000000000000..a362605f9368 --- /dev/null +++ b/include/linux/ceph/msgpool.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef _FS_CEPH_MSGPOOL | ||
| 2 | #define _FS_CEPH_MSGPOOL | ||
| 3 | |||
| 4 | #include <linux/mempool.h> | ||
| 5 | #include "messenger.h" | ||
| 6 | |||
| 7 | /* | ||
| 8 | * we use memory pools for preallocating messages we may receive, to | ||
| 9 | * avoid unexpected OOM conditions. | ||
| 10 | */ | ||
| 11 | struct ceph_msgpool { | ||
| 12 | const char *name; | ||
| 13 | mempool_t *pool; | ||
| 14 | int front_len; /* preallocated payload size */ | ||
| 15 | }; | ||
| 16 | |||
| 17 | extern int ceph_msgpool_init(struct ceph_msgpool *pool, | ||
| 18 | int front_len, int size, bool blocking, | ||
| 19 | const char *name); | ||
| 20 | extern void ceph_msgpool_destroy(struct ceph_msgpool *pool); | ||
| 21 | extern struct ceph_msg *ceph_msgpool_get(struct ceph_msgpool *, | ||
| 22 | int front_len); | ||
| 23 | extern void ceph_msgpool_put(struct ceph_msgpool *, struct ceph_msg *); | ||
| 24 | |||
| 25 | #endif | ||
