]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix invalid omap name conversion when upgrading to per-pg.
authorIgor Fedotov <ifed@suse.com>
Wed, 27 Oct 2021 10:59:34 +0000 (13:59 +0300)
committerIgor Fedotov <ifed@suse.com>
Wed, 3 Nov 2021 14:17:46 +0000 (17:17 +0300)
Fixes: https://tracker.ceph.com/issues/53062
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit cbc97018d883333f81ab9a3cfa99d2f68a9874cd)

src/os/bluestore/BlueStore.cc

index 91d64b8fd95f40535fd438a90a11fd97d2ff2e51..b217106881b6f7b4251782b7cad915df1c78d278 100644 (file)
@@ -7876,6 +7876,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);
@@ -7883,7 +7884,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();