diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 870fdd05982..4a6ed07c68e 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -14,6 +14,10 @@ #include "SnapMapper.h" +#define dout_subsys ceph_subsys_osd +#undef dout_prefix +#define dout_prefix *_dout << "snap_mapper." + using std::string; const string SnapMapper::MAPPING_PREFIX = "MAP_"; @@ -145,7 +149,10 @@ int SnapMapper::get_snaps( if (out) { bufferlist::iterator bp = got.begin()->second.begin(); ::decode(*out, bp); + dout(20) << __func__ << " " << oid << " " << out->snaps << dendl; assert(!out->snaps.empty()); + } else { + dout(20) << __func__ << " " << oid << " (out == NULL)" << dendl; } return 0; } @@ -179,6 +186,9 @@ int SnapMapper::update_snaps( const set *old_snaps_check, MapCacher::Transaction *t) { + dout(20) << __func__ << " " << oid << " " << new_snaps + << " was " << (old_snaps_check ? *old_snaps_check : set()) + << dendl; assert(check(oid)); if (new_snaps.empty()) return remove_oid(oid, t); @@ -210,6 +220,7 @@ void SnapMapper::add_oid( set snaps, MapCacher::Transaction *t) { + dout(20) << __func__ << " " << oid << " " << snaps << dendl; assert(check(oid)); { object_snaps out; @@ -267,6 +278,7 @@ int SnapMapper::remove_oid( const hobject_t &oid, MapCacher::Transaction *t) { + dout(20) << __func__ << " " << oid << dendl; assert(check(oid)); return _remove_oid(oid, t); }