]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pack any types we use blobhash on
authorSage Weil <sage@newdream.net>
Thu, 3 Apr 2008 19:42:01 +0000 (12:42 -0700)
committerSage Weil <sage@newdream.net>
Thu, 3 Apr 2008 19:42:01 +0000 (12:42 -0700)
src/msg/msg_types.h
src/osd/osd_types.h

index b5ba1d3b6d488cd3ee3ab76919b0552bff469482..96196210922ab2f193e01354511e01300de520b0 100644 (file)
@@ -71,7 +71,7 @@ public:
     return n;
   }
 
-};
+} __attribute__ ((packed));
 
 inline bool operator== (const entity_name_t& l, const entity_name_t& r) { 
   return (l.type() == r.type()) && (l.num() == r.num()); }
@@ -149,7 +149,7 @@ struct entity_addr_t {
       nonce == other.nonce &&
       memcmp(&ipaddr, &other.ipaddr, sizeof(ipaddr)) == 0;
   }
-};
+} __attribute__ ((packed));
 
 inline ostream& operator<<(ostream& out, const entity_addr_t &addr)
 {
@@ -189,7 +189,7 @@ struct entity_inst_t {
     ceph_entity_inst i = {name, addr};
     return i;
   }
-};
+} __attribute__ ((packed));
 
 
 inline bool operator==(const entity_inst_t& a, const entity_inst_t& b) { return memcmp(&a, &b, sizeof(a)) == 0; }
index fec36a6499ccc42b47c12962dace3d8d73675a4f..60ddf099dfc891331f310c2b56bf9eba82cd6201 100644 (file)
  */
 struct osd_reqid_t {
   entity_name_t name; // who
-  int32_t       inc;  // incarnation
   tid_t         tid;
-  osd_reqid_t() : inc(0), tid(0) {}
-  osd_reqid_t(const entity_name_t& a, int i, tid_t t) : name(a), inc(i), tid(t) {}
-};
+  int32_t       inc;  // incarnation
+  osd_reqid_t() : tid(0), inc(0) {}
+  osd_reqid_t(const entity_name_t& a, int i, tid_t t) : name(a), tid(t), inc(i) {}
+} __attribute__ ((packed));
 
 inline ostream& operator<<(ostream& out, const osd_reqid_t& r) {
   return out << r.name << "." << r.inc << ":" << r.tid;