From: Sage Weil Date: Thu, 7 Dec 2017 00:10:39 +0000 (-0600) Subject: osd/SnapMapper: more debug around errors X-Git-Tag: v13.0.2~796^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5690520542a6738b17e44ad5a6a0869d5ce40fb;p=ceph.git osd/SnapMapper: more debug around errors Hunting http://tracker.ceph.com/issues/21557 Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 249d00548ea..f08d5f260f7 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4062,6 +4062,7 @@ void PG::_scan_snaps(ScrubMap &smap) << " oid " << hoid << " snaps missing in mapper" << ", should be: " << obj_snaps + << " was " << cur_snaps << " r " << r << "...repaired"; } snap_mapper.add_oid(hoid, obj_snaps, &_t); diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 81c54851004..ab1affb8f25 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -143,10 +143,14 @@ int SnapMapper::get_snaps( map got; keys.insert(to_object_key(oid)); int r = backend.get_keys(keys, &got); - if (r < 0) + if (r < 0) { + dout(20) << __func__ << " " << oid << " got err " << r << dendl; return r; - if (got.empty()) + } + if (got.empty()) { + dout(20) << __func__ << " " << oid << " got.empty()" << dendl; return -ENOENT; + } if (out) { bufferlist::iterator bp = got.begin()->second.begin(); ::decode(*out, bp);