]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: make coll_t operator== less picky
authorSage Weil <sage@redhat.com>
Sat, 28 Mar 2015 00:06:44 +0000 (17:06 -0700)
committerSage Weil <sage@redhat.com>
Wed, 19 Aug 2015 21:03:53 +0000 (17:03 -0400)
For meta coll's do not compare pg.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/osd_types.h

index e7076545441755b45dee98d23a68fd01f4f3bb2c..55a4a9c4b78645405eb6a9397f901e3874e7fc4f 100644 (file)
@@ -599,6 +599,11 @@ public:
   void decode(bufferlist::iterator& bl);
 
   inline bool operator==(const coll_t& rhs) const {
+    // only compare type if meta
+    if (type != rhs.type)
+      return false;
+    if (type == TYPE_META)
+      return true;
     return type == rhs.type && pgid == rhs.pgid;
   }
   inline bool operator!=(const coll_t& rhs) const {