From: Sage Weil Date: Fri, 18 Sep 2009 21:57:35 +0000 (-0700) Subject: kclient: rename msgpool type X-Git-Tag: v0.15~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f00f11155072feab9bb3afdfe7717012a8d8840;p=ceph.git kclient: rename msgpool type --- diff --git a/src/kernel/messenger.h b/src/kernel/messenger.h index 1e6de3a301c3..613313a04502 100644 --- a/src/kernel/messenger.h +++ b/src/kernel/messenger.h @@ -101,7 +101,7 @@ struct ceph_msg { bool more_to_follow; int front_max; - struct ceph_msg_pool *pool; + struct ceph_msgpool *pool; }; struct ceph_msg_pos { diff --git a/src/kernel/mon_client.h b/src/kernel/mon_client.h index f6a2346feae7..5258c5693b03 100644 --- a/src/kernel/mon_client.h +++ b/src/kernel/mon_client.h @@ -64,9 +64,9 @@ struct ceph_mon_client { 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; diff --git a/src/kernel/msgpool.c b/src/kernel/msgpool.c index 9c91fe0f88d6..e92e3f2b2a37 100644 --- a/src/kernel/msgpool.c +++ b/src/kernel/msgpool.c @@ -33,7 +33,7 @@ /* * 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; @@ -60,7 +60,7 @@ static int __fill_msgpool(struct ceph_msg_pool *pool) 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; @@ -80,7 +80,7 @@ int ceph_msgpool_init(struct ceph_msg_pool *pool, 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); @@ -89,7 +89,7 @@ void ceph_msgpool_destroy(struct ceph_msg_pool *pool) 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; @@ -101,7 +101,7 @@ int ceph_msgpool_resv(struct ceph_msg_pool *pool, int delta) 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; @@ -139,7 +139,7 @@ struct ceph_msg *ceph_msgpool_get(struct ceph_msg_pool *pool) } } -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) { diff --git a/src/kernel/msgpool.h b/src/kernel/msgpool.h index 7122ca6a9987..07a2decaa6d8 100644 --- a/src/kernel/msgpool.h +++ b/src/kernel/msgpool.h @@ -7,7 +7,7 @@ * 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 */ @@ -16,11 +16,11 @@ struct ceph_msg_pool { 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 diff --git a/src/kernel/osd_client.h b/src/kernel/osd_client.h index 84f392c891ee..9a4addf7d651 100644 --- a/src/kernel/osd_client.h +++ b/src/kernel/osd_client.h @@ -87,8 +87,8 @@ struct ceph_osd_client { 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,