From: Igor Fedotov Date: Wed, 27 Oct 2021 10:59:34 +0000 (+0300) Subject: os/bluestore: fix invalid omap name conversion when upgrading to per-pg. X-Git-Tag: v17.1.0~542^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43687%2Fhead;p=ceph.git os/bluestore: fix invalid omap name conversion when upgrading to per-pg. Fixes: https://tracker.ceph.com/issues/53062 Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e5d291b63803..5926297c9805 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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();