]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/SnapMapper: Crimson - fix OSDriver::get_next 57314/head
authorMatan Breizman <mbreizma@redhat.com>
Mon, 12 Feb 2024 09:26:36 +0000 (09:26 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 7 May 2024 10:08:12 +0000 (13:08 +0300)
There are other omap_keys that we may return which are not
SnapMapper entries (_biginfo, _epoch, _fastinfo etc.).

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 8fd9b037f5802ec8dab4d69f11435e4217dff76a)

src/osd/SnapMapper.cc

index 7db442cf1377de0d34eb9101fdcb0fbddda928df..0f8b007f0edc5d053b2b818ea1b68e4f1c75af07 100644 (file)
@@ -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 {