diff options
| author | Ilya Dryomov <idryomov@gmail.com> | 2017-06-15 10:30:54 -0400 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-07 11:25:15 -0400 |
| commit | 8cb441c0545dfd4dafeedc1e2d7157e1072413ac (patch) | |
| tree | 8b75dbdfe7417f54bf4fcb12868cb1d3a89e2540 /include/linux/ceph | |
| parent | 98ad5ebd1505eb903ae8bc27e94c1ab0d1c3e651 (diff) | |
libceph: MOSDOp v8 encoding (actual spgid + full hash)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph')
| -rw-r--r-- | include/linux/ceph/osd_client.h | 17 | ||||
| -rw-r--r-- | include/linux/ceph/osdmap.h | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index 6114f7b02135..bca2718ac253 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
| @@ -205,6 +205,23 @@ struct ceph_request_redirect { | |||
| 205 | struct ceph_object_locator oloc; | 205 | struct ceph_object_locator oloc; |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | /* | ||
| 209 | * osd request identifier | ||
| 210 | * | ||
| 211 | * caller name + incarnation# + tid to unique identify this request | ||
| 212 | */ | ||
| 213 | struct ceph_osd_reqid { | ||
| 214 | struct ceph_entity_name name; | ||
| 215 | __le64 tid; | ||
| 216 | __le32 inc; | ||
| 217 | } __packed; | ||
| 218 | |||
| 219 | struct ceph_blkin_trace_info { | ||
| 220 | __le64 trace_id; | ||
| 221 | __le64 span_id; | ||
| 222 | __le64 parent_span_id; | ||
| 223 | } __packed; | ||
| 224 | |||
| 208 | typedef void (*rados_watchcb2_t)(void *arg, u64 notify_id, u64 cookie, | 225 | typedef void (*rados_watchcb2_t)(void *arg, u64 notify_id, u64 cookie, |
| 209 | u64 notifier_id, void *data, size_t data_len); | 226 | u64 notifier_id, void *data, size_t data_len); |
| 210 | typedef void (*rados_watcherrcb_t)(void *arg, u64 cookie, int err); | 227 | typedef void (*rados_watcherrcb_t)(void *arg, u64 cookie, int err); |
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 7ae5b416b4b6..66447fc7f334 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -205,11 +205,13 @@ static inline struct ceph_entity_addr *ceph_osd_addr(struct ceph_osdmap *map, | |||
| 205 | return &map->osd_addr[osd]; | 205 | return &map->osd_addr[osd]; |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | #define CEPH_PGID_ENCODING_LEN (1 + 8 + 4 + 4) | ||
| 209 | |||
| 208 | static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid) | 210 | static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid) |
| 209 | { | 211 | { |
| 210 | __u8 version; | 212 | __u8 version; |
| 211 | 213 | ||
| 212 | if (!ceph_has_room(p, end, 1 + 8 + 4 + 4)) { | 214 | if (!ceph_has_room(p, end, CEPH_PGID_ENCODING_LEN)) { |
| 213 | pr_warn("incomplete pg encoding\n"); | 215 | pr_warn("incomplete pg encoding\n"); |
| 214 | return -EINVAL; | 216 | return -EINVAL; |
| 215 | } | 217 | } |
