]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/SnapMapper: print debug line on check failure
authorSage Weil <sage@redhat.com>
Tue, 13 Mar 2018 22:24:55 +0000 (17:24 -0500)
committerSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 13:24:25 +0000 (08:24 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/SnapMapper.cc
src/osd/SnapMapper.h

index 6998ede3e241dbbdb9785521c4d5e74736b7ef58..348d7a3e224cec76b17802321214361711539f9d 100644 (file)
@@ -134,6 +134,17 @@ void SnapMapper::object_snaps::decode(bufferlist::iterator &bl)
   DECODE_FINISH(bl);
 }
 
+bool SnapMapper::check(const hobject_t &hoid) const
+{
+  if (hoid.match(mask_bits, match)) {
+    return true;
+  }
+  derr << __func__ << " " << hoid << " mask_bits " << mask_bits
+       << " match 0x" << std::hex << match << std::dec << " is false"
+       << dendl;
+  return false;
+}
+
 int SnapMapper::get_snaps(
   const hobject_t &oid,
   object_snaps *out)
index b4361ed7fa6818cfe50caf996668182f5403fd07..99a7c831018787ad5cb76bd6b31d8d35cf7410cf 100644 (file)
@@ -144,9 +144,7 @@ private:
     MapCacher::Transaction<std::string, bufferlist> *t);
 
   // True if hoid belongs in this mapping based on mask_bits and match
-  bool check(const hobject_t &hoid) const {
-    return hoid.match(mask_bits, match);
-  }
+  bool check(const hobject_t &hoid) const;
 
   int _remove_oid(
     const hobject_t &oid,    ///< [in] oid to remove