From: Sage Weil Date: Wed, 2 Sep 2009 18:32:21 +0000 (-0700) Subject: msgr: 64bit entity name num X-Git-Tag: v0.14~60 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=27f6aa37edbbc1eb807bb7f2d42ab9474e087057;p=ceph.git msgr: 64bit entity name num --- diff --git a/src/include/msgr.h b/src/include/msgr.h index 77ce383b379..de85ba1dfb8 100644 --- a/src/include/msgr.h +++ b/src/include/msgr.h @@ -42,8 +42,8 @@ static inline __s32 ceph_seq_cmp(__u32 a, __u32 b) * network, e.g. 'mds0' or 'osd3'. */ struct ceph_entity_name { - __le32 type; - __le32 num; + __u8 type; + __le64 num; } __attribute__ ((packed)); #define CEPH_ENTITY_TYPE_MON 1 diff --git a/src/msg/msg_types.h b/src/msg/msg_types.h index 1830ce9cf5e..8767e811fca 100644 --- a/src/msg/msg_types.h +++ b/src/msg/msg_types.h @@ -22,7 +22,8 @@ class entity_name_t { public: - __u32 _type, _num; + __u8 _type; + __s64 _num; public: static const int TYPE_MON = CEPH_ENTITY_TYPE_MON; @@ -35,7 +36,7 @@ public: // cons entity_name_t() : _type(0), _num(0) { } - entity_name_t(int t, int n) : _type(t), _num(n) { } + entity_name_t(int t, __s64 n) : _type(t), _num(n) { } entity_name_t(const ceph_entity_name &n) : _type(n.type), _num(n.num) { } @@ -46,7 +47,7 @@ public: static entity_name_t CLIENT(int i=NEW) { return entity_name_t(TYPE_CLIENT, i); } static entity_name_t ADMIN(int i=NEW) { return entity_name_t(TYPE_ADMIN, i); } - int num() const { return _num; } + __s64 num() const { return _num; } int type() const { return _type; } const char *type_str() const { switch (type()) { @@ -68,7 +69,7 @@ public: bool is_admin() const { return type() == TYPE_ADMIN; } operator ceph_entity_name() const { - ceph_entity_name n = { init_le32(_type), init_le32(_num) }; + ceph_entity_name n = { _type, init_le64(_num) }; return n; }