]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix omap upgrade to per-pg scheme 43921/head
authorAdam Kupczyk <akupczyk@redhat.com>
Sat, 13 Nov 2021 10:28:18 +0000 (11:28 +0100)
committerAdam Kupczyk <akupczyk@redhat.com>
Wed, 17 Nov 2021 15:56:23 +0000 (16:56 +0100)
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 <akupczyk@redhat.com>
src/os/bluestore/BlueStore.cc

index a0dcfa80b7f8743181ffcab206416bf7c2e6a6e8..034b379c0a7ed281bb5a63e9b5cc4bd674a99ca7 100644 (file)
@@ -8324,6 +8324,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
       {
@@ -8337,7 +8338,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);