From 1f92ca315af3bc7b75c08dd148f5e6477152e652 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 13 Mar 2018 17:24:55 -0500 Subject: [PATCH] osd/SnapMapper: print debug line on check failure Signed-off-by: Sage Weil --- src/osd/SnapMapper.cc | 11 +++++++++++ src/osd/SnapMapper.h | 4 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 6998ede3e24..348d7a3e224 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -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) diff --git a/src/osd/SnapMapper.h b/src/osd/SnapMapper.h index b4361ed7fa6..99a7c831018 100644 --- a/src/osd/SnapMapper.h +++ b/src/osd/SnapMapper.h @@ -144,9 +144,7 @@ private: MapCacher::Transaction *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