aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-05-13 03:19:26 -0400
committerYan, Zheng <zheng.z.yan@intel.com>2014-06-05 21:29:57 -0400
commit513a8243d67f8e8d27f2883bd2f18bc87c7ca376 (patch)
treefd782278a338b2e8b695f47950628dc82d246c5d /include/linux
parent002b36ba5ef7a0e2ad0392130a71029765136cf0 (diff)
libceph: mon_get_version request infrastructure
Add support for mon_get_version requests to libceph. This reuses much of the ceph_mon_generic_request infrastructure, with one exception. Older OSDs don't set mon_get_version reply hdr->tid even if the original request had a non-zero tid, which makes it impossible to lookup ceph_mon_generic_request contexts by tid in get_generic_reply() for such replies. As a workaround, we allocate a reply message on the reply path. This can probably interfere with revoke, but I don't see a better way. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/mon_client.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/ceph/mon_client.h b/include/linux/ceph/mon_client.h
index a486f390dfbe..585ef9450e9d 100644
--- a/include/linux/ceph/mon_client.h
+++ b/include/linux/ceph/mon_client.h
@@ -40,9 +40,9 @@ struct ceph_mon_request {
40}; 40};
41 41
42/* 42/*
43 * ceph_mon_generic_request is being used for the statfs and poolop requests 43 * ceph_mon_generic_request is being used for the statfs, poolop and
44 * which are bening done a bit differently because we need to get data back 44 * mon_get_version requests which are being done a bit differently
45 * to the caller 45 * because we need to get data back to the caller
46 */ 46 */
47struct ceph_mon_generic_request { 47struct ceph_mon_generic_request {
48 struct kref kref; 48 struct kref kref;
@@ -108,6 +108,9 @@ extern void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc);
108extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, 108extern int ceph_monc_do_statfs(struct ceph_mon_client *monc,
109 struct ceph_statfs *buf); 109 struct ceph_statfs *buf);
110 110
111extern int ceph_monc_do_get_version(struct ceph_mon_client *monc,
112 const char *what, u64 *newest);
113
111extern int ceph_monc_open_session(struct ceph_mon_client *monc); 114extern int ceph_monc_open_session(struct ceph_mon_client *monc);
112 115
113extern int ceph_monc_validate_auth(struct ceph_mon_client *monc); 116extern int ceph_monc_validate_auth(struct ceph_mon_client *monc);