diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-06-15 16:30:54 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-07 17:25:15 +0200 |
commit | 8cb441c0545dfd4dafeedc1e2d7157e1072413ac (patch) | |
tree | 8b75dbdfe7417f54bf4fcb12868cb1d3a89e2540 /include/linux/ceph/osdmap.h | |
parent | 98ad5ebd1505eb903ae8bc27e94c1ab0d1c3e651 (diff) | |
download | linux-8cb441c0545dfd4dafeedc1e2d7157e1072413ac.tar.gz linux-8cb441c0545dfd4dafeedc1e2d7157e1072413ac.tar.bz2 linux-8cb441c0545dfd4dafeedc1e2d7157e1072413ac.zip |
libceph: MOSDOp v8 encoding (actual spgid + full hash)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r-- | include/linux/ceph/osdmap.h | 4 |
1 files changed, 3 insertions, 1 deletions
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, return &map->osd_addr[osd]; } +#define CEPH_PGID_ENCODING_LEN (1 + 8 + 4 + 4) + static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid) { __u8 version; - if (!ceph_has_room(p, end, 1 + 8 + 4 + 4)) { + if (!ceph_has_room(p, end, CEPH_PGID_ENCODING_LEN)) { pr_warn("incomplete pg encoding\n"); return -EINVAL; } |