Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[pandora-kernel.git] / fs / ceph / mon_client.h
index b958ad5..174d794 100644 (file)
@@ -2,10 +2,10 @@
 #define _FS_CEPH_MON_CLIENT_H
 
 #include <linux/completion.h>
+#include <linux/kref.h>
 #include <linux/rbtree.h>
 
 #include "messenger.h"
-#include "msgpool.h"
 
 struct ceph_client;
 struct ceph_mount_args;
@@ -22,7 +22,7 @@ struct ceph_monmap {
 };
 
 struct ceph_mon_client;
-struct ceph_mon_statfs_request;
+struct ceph_mon_generic_request;
 
 
 /*
@@ -40,17 +40,19 @@ struct ceph_mon_request {
 };
 
 /*
- * statfs() is done a bit differently because we need to get data back
+ * ceph_mon_generic_request is being used for the statfs and poolop requests
+ * which are bening done a bit differently because we need to get data back
  * to the caller
  */
-struct ceph_mon_statfs_request {
+struct ceph_mon_generic_request {
+       struct kref kref;
        u64 tid;
        struct rb_node node;
        int result;
-       struct ceph_statfs *buf;
+       void *buf;
        struct completion completion;
-       unsigned long last_attempt, delay; /* jiffies */
        struct ceph_msg *request;  /* original request */
+       struct ceph_msg *reply;    /* and reply */
 };
 
 struct ceph_mon_client {
@@ -61,7 +63,7 @@ struct ceph_mon_client {
        struct delayed_work delayed_work;
 
        struct ceph_auth_client *auth;
-       struct ceph_msg *m_auth;
+       struct ceph_msg *m_auth, *m_auth_reply, *m_subscribe, *m_subscribe_ack;
        int pending_auth;
 
        bool hunting;
@@ -70,14 +72,9 @@ struct ceph_mon_client {
        struct ceph_connection *con;
        bool have_fsid;
 
-       /* msg pools */
-       struct ceph_msgpool msgpool_subscribe_ack;
-       struct ceph_msgpool msgpool_statfs_reply;
-       struct ceph_msgpool msgpool_auth_reply;
-
-       /* pending statfs requests */
-       struct rb_root statfs_request_tree;
-       int num_statfs_requests;
+       /* pending generic requests */
+       struct rb_root generic_request_tree;
+       int num_generic_requests;
        u64 last_tid;
 
        /* mds/osd map */