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.
Showing the changes to include/linux/ceph (1 of 4 files). Show all
Unified · Split
| @@ -40,9 +40,9 @@ struct ceph_mon_request { · 39 unmodified lines | |||
| 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 | */ |
| 47 | struct ceph_mon_generic_request { | 47 | struct 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); · 59 unmodified lines | |||
| 108 | extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, | 108 | extern int ceph_monc_do_statfs(struct ceph_mon_client *monc, |
| 109 | struct ceph_statfs *buf); | 109 | struct ceph_statfs *buf); |
| 110 | 110 | ||
| 111 | extern int ceph_monc_do_get_version(struct ceph_mon_client *monc, | ||
| 112 | const char *what, u64 *newest); | ||
| 113 | |||
| 111 | extern int ceph_monc_open_session(struct ceph_mon_client *monc); | 114 | extern int ceph_monc_open_session(struct ceph_mon_client *monc); |
| 112 | 115 | ||
| 113 | extern int ceph_monc_validate_auth(struct ceph_mon_client *monc); | 116 | extern int ceph_monc_validate_auth(struct ceph_mon_client *monc); |