]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix invalid omap name conversion when upgrading to per-pg. 43687/head
authorIgor Fedotov <ifed@suse.com>
Wed, 27 Oct 2021 10:59:34 +0000 (13:59 +0300)
committerIgor Fedotov <ifed@suse.com>
Thu, 28 Oct 2021 12:58:48 +0000 (15:58 +0300)
Fixes: https://tracker.ceph.com/issues/53062
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueStore.cc

index e5d291b63803404e3625c2c1abd9bd0abf280d9f..5926297c980578871ef79a76fe296757f2f8088f 100644 (file)
@@ -8072,6 +8072,7 @@ void BlueStore::_fsck_check_object_omap(FSCKDepth depth,
       string final_key;
       Onode::calc_omap_key(new_flags, o.get(), string(), &final_key);
       size_t base_key_len = final_key.size();
+      it->next();
       while (it->valid() && it->key() < tail) {
        string user_key;
        o->decode_omap_key(it->key(), &user_key);
@@ -8079,7 +8080,7 @@ void BlueStore::_fsck_check_object_omap(FSCKDepth depth,
          << " -> " << user_key << dendl;
 
        final_key.resize(base_key_len);
-       final_key += it->key();
+       final_key += user_key;
        auto v = it->value();
        txn->set(new_omap_prefix, final_key, v);
        txn_cost += final_key.length() + v.length();