hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/include/linux/ceph/msgr.h
....@@ -61,11 +61,18 @@
6161 * entity_addr -- network address
6262 */
6363 struct ceph_entity_addr {
64
- __le32 type;
64
+ __le32 type; /* CEPH_ENTITY_ADDR_TYPE_* */
6565 __le32 nonce; /* unique id for process (e.g. pid) */
6666 struct sockaddr_storage in_addr;
6767 } __attribute__ ((packed));
6868
69
+static inline bool ceph_addr_equal_no_type(const struct ceph_entity_addr *lhs,
70
+ const struct ceph_entity_addr *rhs)
71
+{
72
+ return !memcmp(&lhs->in_addr, &rhs->in_addr, sizeof(lhs->in_addr)) &&
73
+ lhs->nonce == rhs->nonce;
74
+}
75
+
6976 struct ceph_entity_inst {
7077 struct ceph_entity_name name;
7178 struct ceph_entity_addr addr;