]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix omap upgrade to per-pg scheme 43922/head
authorAdam Kupczyk <akupczyk@redhat.com>
Sat, 13 Nov 2021 10:28:18 +0000 (11:28 +0100)
committerNeha Ojha <nojha@redhat.com>
Fri, 19 Nov 2021 19:31:30 +0000 (19:31 +0000)
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/53307
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 65a3f374aa1c57c5bb9401e57dab98a643b4360a)

src/os/bluestore/BlueStore.cc
src/test/objectstore/store_test.cc

index 77a12bd510091bce1f61ecd4fb0005866ca4be12..8b893be79d18f36113ab14fcfe5660f467564b5b 100644 (file)
@@ -7863,6 +7863,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
       {
@@ -7876,7 +7877,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);
index 970c0cf2ae474bcae8038937d8a523e75aa94203..643cfc1fce7e2a3ca41dd053b8c176fec3db2f84 100644 (file)
@@ -6823,8 +6823,7 @@ INSTANTIATE_TEST_SUITE_P(
 #endif
     "kstore"));
 
-//void doMany4KWritesTest(boost::scoped_ptr<ObjectStore>& store,
-void doMany4KWritesTest(ObjectStore* store,
+void doMany4KWritesTest(boost::scoped_ptr<ObjectStore>& store,
                         unsigned max_objects,
                         unsigned max_ops,
                         unsigned max_object_size,