aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mon_client.h
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-04-22 18:40:37 -0400
committerSage Weil <sage@newdream.net>2010-05-17 18:25:33 -0400
commitf8c76f6f250edbdc9d2011b0e05d196a3d8ae895 (patch)
treeb53964559534aa989b3e24a404104631d67be8b6 /fs/ceph/mon_client.h
parentdbad185d4939ffb806f6fa753ef9f470e3b72b62 (diff)
ceph: make mon client statfs handling more generic
This is being done so that we could reuse the statfs infrastructure with other requests that return values. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.h')
-rw-r--r--fs/ceph/mon_client.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ceph/mon_client.h b/fs/ceph/mon_client.h
index 0046deed0740..76887785a4d7 100644
--- a/fs/ceph/mon_client.h
+++ b/fs/ceph/mon_client.h
@@ -22,7 +22,7 @@ struct ceph_monmap {
22}; 22};
23 23
24struct ceph_mon_client; 24struct ceph_mon_client;
25struct ceph_mon_statfs_request; 25struct ceph_mon_generic_request;
26 26
27 27
28/* 28/*
@@ -40,15 +40,16 @@ struct ceph_mon_request {
40}; 40};
41 41
42/* 42/*
43 * statfs() is done a bit differently because we need to get data back 43 * ceph_mon_generic_request is being used for the statfs and poolop requests
44 * which are bening done a bit differently because we need to get data back
44 * to the caller 45 * to the caller
45 */ 46 */
46struct ceph_mon_statfs_request { 47struct ceph_mon_generic_request {
47 struct kref kref; 48 struct kref kref;
48 u64 tid; 49 u64 tid;
49 struct rb_node node; 50 struct rb_node node;
50 int result; 51 int result;
51 struct ceph_statfs *buf; 52 void *buf;
52 struct completion completion; 53 struct completion completion;
53 struct ceph_msg *request; /* original request */ 54 struct ceph_msg *request; /* original request */
54 struct ceph_msg *reply; /* and reply */ 55 struct ceph_msg *reply; /* and reply */
@@ -71,9 +72,9 @@ struct ceph_mon_client {
71 struct ceph_connection *con; 72 struct ceph_connection *con;
72 bool have_fsid; 73 bool have_fsid;
73 74
74 /* pending statfs requests */ 75 /* pending generic requests */
75 struct rb_root statfs_request_tree; 76 struct rb_root generic_request_tree;
76 int num_statfs_requests; 77 int num_generic_requests;
77 u64 last_tid; 78 u64 last_tid;
78 79
79 /* mds/osd map */ 80 /* mds/osd map */