From: Matan Breizman Date: Mon, 12 Feb 2024 09:26:36 +0000 (+0000) Subject: osd/SnapMapper: Crimson - fix OSDriver::get_next X-Git-Tag: v20.0.0~2463^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8fd9b037f5802ec8dab4d69f11435e4217dff76a;p=ceph.git osd/SnapMapper: Crimson - fix OSDriver::get_next There are other omap_keys that we may return which are not SnapMapper entries (_biginfo, _epoch, _fastinfo etc.). Signed-off-by: Matan Breizman --- diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 40611f7a646a..8f1be7052693 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -119,7 +119,8 @@ int OSDriver::get_next( ch, hoid, key ).safe_then_unpack([&key, next] (bool, FuturizedStore::Shard::omap_values_t&& vals) { CRIMSON_DEBUG("OSDriver::get_next key {} got omap values", key); - if (auto nit = std::begin(vals); nit == std::end(vals)) { + if (auto nit = std::begin(vals); + nit == std::end(vals) || !SnapMapper::is_mapping(nit->first)) { CRIMSON_DEBUG("OSDriver::get_next key {} no more values", key); return -ENOENT; } else {