diff options
author | Douglas Fuller <dfuller@redhat.com> | 2015-07-22 20:59:52 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-08-24 17:49:15 -0400 |
commit | 6305a3b415157759bfe4b50a643fac22ea229f5c (patch) | |
tree | 416bf087b76a57a23c179b821fb6dfd20d6f23ae /include/linux/ceph | |
parent | d4ed4a530562881cc5225050e42d96034f405aae (diff) |
libceph: support for blacklisting clients
Reuse ceph_mon_generic_request infrastructure for sending monitor
commands. In particular, add support for 'blacklist add' to prevent
other, non-responsive clients from making further updates.
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
[idryomov@gmail.com: refactor, misc fixes throughout]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/ceph_fs.h | 11 | ||||
-rw-r--r-- | include/linux/ceph/mon_client.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 7868d602c0a0..c086e63dcee1 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
@@ -138,6 +138,9 @@ struct ceph_dir_layout { | |||
138 | #define CEPH_MSG_POOLOP_REPLY 48 | 138 | #define CEPH_MSG_POOLOP_REPLY 48 |
139 | #define CEPH_MSG_POOLOP 49 | 139 | #define CEPH_MSG_POOLOP 49 |
140 | 140 | ||
141 | /* mon commands */ | ||
142 | #define CEPH_MSG_MON_COMMAND 50 | ||
143 | #define CEPH_MSG_MON_COMMAND_ACK 51 | ||
141 | 144 | ||
142 | /* osd */ | 145 | /* osd */ |
143 | #define CEPH_MSG_OSD_MAP 41 | 146 | #define CEPH_MSG_OSD_MAP 41 |
@@ -176,6 +179,14 @@ struct ceph_mon_statfs_reply { | |||
176 | struct ceph_statfs st; | 179 | struct ceph_statfs st; |
177 | } __attribute__ ((packed)); | 180 | } __attribute__ ((packed)); |
178 | 181 | ||
182 | struct ceph_mon_command { | ||
183 | struct ceph_mon_request_header monhdr; | ||
184 | struct ceph_fsid fsid; | ||
185 | __le32 num_strs; /* always 1 */ | ||
186 | __le32 str_len; | ||
187 | char str[]; | ||
188 | } __attribute__ ((packed)); | ||
189 | |||
179 | struct ceph_osd_getmap { | 190 | struct ceph_osd_getmap { |
180 | struct ceph_mon_request_header monhdr; | 191 | struct ceph_mon_request_header monhdr; |
181 | struct ceph_fsid fsid; | 192 | struct ceph_fsid fsid; |
diff --git a/include/linux/ceph/mon_client.h b/include/linux/ceph/mon_client.h index 24d704d1ea5c..d5a3ecea578d 100644 --- a/include/linux/ceph/mon_client.h +++ b/include/linux/ceph/mon_client.h | |||
@@ -141,6 +141,9 @@ int ceph_monc_get_version(struct ceph_mon_client *monc, const char *what, | |||
141 | int ceph_monc_get_version_async(struct ceph_mon_client *monc, const char *what, | 141 | int ceph_monc_get_version_async(struct ceph_mon_client *monc, const char *what, |
142 | ceph_monc_callback_t cb, u64 private_data); | 142 | ceph_monc_callback_t cb, u64 private_data); |
143 | 143 | ||
144 | int ceph_monc_blacklist_add(struct ceph_mon_client *monc, | ||
145 | struct ceph_entity_addr *client_addr); | ||
146 | |||
144 | extern int ceph_monc_open_session(struct ceph_mon_client *monc); | 147 | extern int ceph_monc_open_session(struct ceph_mon_client *monc); |
145 | 148 | ||
146 | extern int ceph_monc_validate_auth(struct ceph_mon_client *monc); | 149 | extern int ceph_monc_validate_auth(struct ceph_mon_client *monc); |