]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: rename msgpool type
authorSage Weil <sage@newdream.net>
Fri, 18 Sep 2009 21:57:35 +0000 (14:57 -0700)
committerSage Weil <sage@newdream.net>
Fri, 18 Sep 2009 21:57:35 +0000 (14:57 -0700)
src/kernel/messenger.h
src/kernel/mon_client.h
src/kernel/msgpool.c
src/kernel/msgpool.h
src/kernel/osd_client.h

index 1e6de3a301c3ea8b0a8b5a2c4d02d5a938eca8ac..613313a045024a0be2abaf6cba222806b675ca52 100644 (file)
@@ -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 {
index f6a2346feae78783cf600ce08b94d03690974a34..5258c5693b0350f65868f88ad42a91c7b2eddb61 100644 (file)
@@ -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;
index 9c91fe0f88d69421c4381e1d96427fb2f4f53d07..e92e3f2b2a37a4b0367f12fdcfb536b6f7849531 100644 (file)
@@ -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) {
index 7122ca6a9987e0af8bd3d13c7a8351169c27526d..07a2decaa6d837ffd711ff1f14f5f774c3e42e81 100644 (file)
@@ -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
index 84f392c891eec4c87b1de11f76219875b8e2137f..9a4addf7d651ef71d0e5f5365d8853979fabf73d 100644 (file)
@@ -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,