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: v16.2.7~58^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc0a7e49434f76d97016934feed9a8ec806d1e42;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 (cherry picked from commit cbc97018d883333f81ab9a3cfa99d2f68a9874cd) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 91d64b8fd95f..b217106881b6 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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();