]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
locator: pool id is signed
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Thu, 3 Mar 2011 00:04:15 +0000 (16:04 -0800)
committerYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Thu, 3 Mar 2011 00:04:15 +0000 (16:04 -0800)
src/include/object.h
src/osdc/ObjectCacher.h

index 741834f558ea14d759602a02668fb33ccb292287..cf8c7fe5dc27addf2a85363bf5747c337b89bebc 100644 (file)
@@ -104,7 +104,7 @@ struct file_object_t {
 // a locator constrains the placement of an object.  mainly, which pool
 // does it go in.
 struct object_locator_t {
-  __u32 pool;
+  __s32 pool;
   __s16 preferred;
   string key;
 
index 751d2f47c42f565e44ba41bfb143ba40240d7ac3..915df2814b4a22e6ce0804fccd6f6a79f01e2936 100644 (file)
@@ -296,7 +296,7 @@ class ObjectCacher {
   // objects
   Object *get_object_maybe(sobject_t oid, object_locator_t &l) {
     // have it?
-    if ((l.pool < objects.size()) &&
+    if (((uint32_t)l.pool < objects.size()) &&
         (objects[l.pool].count(oid)))
       return objects[l.pool][oid];
     return NULL;
@@ -304,7 +304,7 @@ class ObjectCacher {
 
   Object *get_object(sobject_t oid, ObjectSet *oset, object_locator_t &l) {
     // have it?
-    if (l.pool < objects.size()) {
+    if ((uint32_t)l.pool < objects.size()) {
       if (objects[l.pool].count(oid))
         return objects[l.pool][oid];
     } else {