]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
object: pack
authorSage Weil <sage@newdream.net>
Wed, 21 May 2008 23:06:45 +0000 (16:06 -0700)
committerSage Weil <sage@newdream.net>
Wed, 21 May 2008 23:06:45 +0000 (16:06 -0700)
src/include/object.h

index daa39200201fab079093cc996d4c90004c54d4b1..3fb9a6b46789ff401f358abb58635027f003baf7 100644 (file)
@@ -39,7 +39,7 @@ struct object_t {
       uint64_t ino;    // "file" identifier
       uint32_t bno;    // "block" in that "file"
       objectrev_t rev; // revision.  normally ctime (as epoch).
-    };
+    } __attribute__ ((packed));
   };
 
   object_t() : ino(0), bno(0), rev(0) {}
@@ -111,7 +111,7 @@ namespace __gnu_cxx {
     size_t operator()(const object_t &r) const { 
       static rjhash<uint64_t> H;
       static rjhash<uint32_t> I;
-      return H(r.ino) ^ I(r.bno) ^ I(r.rev);
+      return H(r.ino) ^ I(r.bno) ^ H(r.rev);
     }
   };