osd/SnapMapper: print debug line on check failure

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-03-13 17:24:55 -05:00
parent e96475b1b7
commit 1f92ca315a
2 changed files with 12 additions and 3 deletions

View 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)

View 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