aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mon_client.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-18 19:19:57 -0500
committerSage Weil <sage@newdream.net>2009-11-18 19:19:57 -0500
commit4e7a5dcd1bbab6560fbc8ada29a840e7a20ed7bc (patch)
treea77e9b4563022340361ca673ef2e1beebb538e2f /fs/ceph/mon_client.h
parent5f44f142601bf94c448e2d463f0f18fd159da164 (diff)
ceph: negotiate authentication protocol; implement AUTH_NONE protocol
When we open a monitor session, we send an initial AUTH message listing the auth protocols we support, our entity name, and (possibly) a previously assigned global_id. The monitor chooses a protocol and responds with an initial message. Initially implement AUTH_NONE, a dummy protocol that provides no security, but works within the new framework. It generates 'authorizers' that are used when connecting to (mds, osd) services that simply state our entity name and global_id. This is a wire protocol change. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.h')
-rw-r--r--fs/ceph/mon_client.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/ceph/mon_client.h b/fs/ceph/mon_client.h
index 9f6db45bf469..c75b53302ecc 100644
--- a/fs/ceph/mon_client.h
+++ b/fs/ceph/mon_client.h
@@ -9,6 +9,7 @@
9 9
10struct ceph_client; 10struct ceph_client;
11struct ceph_mount_args; 11struct ceph_mount_args;
12struct ceph_auth_client;
12 13
13/* 14/*
14 * The monitor map enumerates the set of all monitors. 15 * The monitor map enumerates the set of all monitors.
@@ -58,23 +59,26 @@ struct ceph_mon_client {
58 struct mutex mutex; 59 struct mutex mutex;
59 struct delayed_work delayed_work; 60 struct delayed_work delayed_work;
60 61
62 struct ceph_auth_client *auth;
63 struct ceph_msg *m_auth;
64
61 bool hunting; 65 bool hunting;
62 int cur_mon; /* last monitor i contacted */ 66 int cur_mon; /* last monitor i contacted */
63 unsigned long sub_sent, sub_renew_after; 67 unsigned long sub_sent, sub_renew_after;
64 struct ceph_connection *con; 68 struct ceph_connection *con;
69 bool have_fsid;
65 70
66 /* msg pools */ 71 /* msg pools */
67 struct ceph_msgpool msgpool_mount_ack;
68 struct ceph_msgpool msgpool_subscribe_ack; 72 struct ceph_msgpool msgpool_subscribe_ack;
69 struct ceph_msgpool msgpool_statfs_reply; 73 struct ceph_msgpool msgpool_statfs_reply;
74 struct ceph_msgpool msgpool_auth_reply;
70 75
71 /* pending statfs requests */ 76 /* pending statfs requests */
72 struct radix_tree_root statfs_request_tree; 77 struct radix_tree_root statfs_request_tree;
73 int num_statfs_requests; 78 int num_statfs_requests;
74 u64 last_tid; 79 u64 last_tid;
75 80
76 /* mds/osd map or mount requests */ 81 /* mds/osd map */
77 bool want_mount;
78 int want_next_osdmap; /* 1 = want, 2 = want+asked */ 82 int want_next_osdmap; /* 1 = want, 2 = want+asked */
79 u32 have_osdmap, have_mdsmap; 83 u32 have_osdmap, have_mdsmap;
80 84
@@ -101,11 +105,11 @@ extern int ceph_monc_got_osdmap(struct ceph_mon_client *monc, u32 have);
101 105
102extern void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc); 106extern void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc);
103 107
104extern int ceph_monc_request_mount(struct ceph_mon_client *monc);
105
106extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, 108extern int ceph_monc_do_statfs(struct ceph_mon_client *monc,
107 struct ceph_statfs *buf); 109 struct ceph_statfs *buf);
108 110
111extern int ceph_monc_open_session(struct ceph_mon_client *monc);
112
109 113
110 114
111#endif 115#endif