From: Adam Kupczyk Date: Sat, 13 Nov 2021 10:28:18 +0000 (+0100) Subject: os/bluestore: Fix omap upgrade to per-pg scheme X-Git-Tag: v15.2.16~71^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42958%2Fhead;p=ceph.git os/bluestore: Fix omap upgrade to per-pg scheme This is fix to regression introduced by fix to omap upgrade: https://github.com/ceph/ceph/pull/43687 The problem was that we always skipped first omap entry. This worked fine with objects having omap header key. For objects without header key we skipped first actual omap key. Fixes: https://tracker.ceph.com/issues/53260 Signed-off-by: Adam Kupczyk (cherry picked from commit 65a3f374aa1c57c5bb9401e57dab98a643b4360a) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index eb0babf2041..3156614a330 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8204,6 +8204,7 @@ void BlueStore::_fsck_check_object_omap(FSCKDepth depth, txn->set(new_omap_prefix, new_head, header); txn_cost += new_head.length() + header.length(); } + it->next(); } // tail { @@ -8217,7 +8218,6 @@ 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);