libceph: add ceph_decode_entity_addr
Add a function for decoding an entity_addr_t. Once CEPH_FEATURE_MSG_ADDR2 is enabled, the server daemons will start encoding entity_addr_t differently. Add a new helper function that can handle either format. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:

committed by
Ilya Dryomov

parent
bc07532cc5
commit
6c37f0e641
@@ -230,6 +230,8 @@ static inline void ceph_decode_addr(struct ceph_entity_addr *a)
|
||||
WARN_ON(a->in_addr.ss_family == 512);
|
||||
}
|
||||
|
||||
extern int ceph_decode_entity_addr(void **p, void *end,
|
||||
struct ceph_entity_addr *addr);
|
||||
/*
|
||||
* encoders
|
||||
*/
|
||||
|
Reference in New Issue
Block a user