]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Remove inject_21040.
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 21 Nov 2022 11:25:40 +0000 (11:25 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 6 Jul 2023 15:28:49 +0000 (15:28 +0000)
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
src/common/options/global.yaml.in
src/os/bluestore/BlueStore.cc
src/test/objectstore/store_test.cc

index fe08916d49542b992e98a63a8fb7a0e1ef3982dd..39c61e1f5a8cbd4b655927172b086f8e8f56038a 100644 (file)
@@ -5274,11 +5274,6 @@ options:
   level: dev
   default: 0
   with_legacy: true
-- name: bluestore_debug_inject_bug21040
-  type: bool
-  level: dev
-  default: false
-  with_legacy: true
 - name: bluestore_debug_inject_csum_err_probability
   type: float
   level: dev
index 38e554ed28085e2733605360096446295b25ea61..2de13e899620f605b05fd94e77d69fc24c0b5c57 100644 (file)
@@ -2559,9 +2559,6 @@ void BlueStore::ExtentMap::dup(BlueStore* b, TransContext* txc,
     coll_cache->lock.unlock();
   } while (true);
 
-  auto cct = onode->c->store->cct;
-  bool inject_21040 =
-    cct->_conf->bluestore_debug_inject_bug21040;  
   vector<BlobRef> id_to_blob(oldo->extent_map.extent_map.size());
   for (auto& e : oldo->extent_map.extent_map) {
     e.blob->last_encoded_id = -1;
@@ -2591,12 +2588,9 @@ void BlueStore::ExtentMap::dup(BlueStore* b, TransContext* txc,
       // make sure it is shared
       if (!blob.is_shared()) {
         c->make_blob_shared(b->_assign_blobid(txc), e.blob);
-       if (!inject_21040 && !src_dirty) {
+       if (!src_dirty) {
           src_dirty = true;
           dirty_range_begin = e.logical_offset;
-       } else if (inject_21040 &&
-                  dirty_range_begin == 0 && dirty_range_end == 0) {
-         dirty_range_begin = e.logical_offset;
        }        
         ceph_assert(e.logical_end() > 0);
         // -1 to exclude next potential shard
@@ -2657,8 +2651,7 @@ void BlueStore::ExtentMap::dup(BlueStore* b, TransContext* txc,
     dout(20) << __func__ << "  dst " << *ne << dendl;
     ++n;
   }
-  if ((!inject_21040 && src_dirty) ||
-       (inject_21040 && dirty_range_end > dirty_range_begin)) {
+  if (src_dirty) {
     oldo->extent_map.dirty_range(dirty_range_begin,
       dirty_range_end - dirty_range_begin);
     txc->write_onode(oldo);
index 3b2820d8466ac9ef42ddd33e130c0b0871dfaba1..60ce9ff05406d26fd2bd9049744ba11a61dbdc2d 100644 (file)
@@ -9274,40 +9274,6 @@ TEST_P(StoreTestSpecificAUSize, BluestoreRepairTest) {
 
   ASSERT_EQ(bstore->fsck(true), 0);
 
-  // reproducing issues #21040 & 20983
-  SetVal(g_conf(), "bluestore_debug_inject_bug21040", "true");
-  g_ceph_context->_conf.apply_changes(nullptr);
-  bstore->mount();
-
-  cerr << "repro bug #21040" << std::endl;
-  {
-    auto ch = store->open_collection(cid);
-    {
-      ObjectStore::Transaction t;
-      bl.append("0123456789012345");
-      t.write(cid, hoid3, offs_base, bl.length(), bl);
-      bl.clear();
-      bl.append('!');
-      t.write(cid, hoid3, 0, bl.length(), bl);
-
-      r = queue_transaction(store, ch, std::move(t));
-      ASSERT_EQ(r, 0);
-    }
-    {
-      ObjectStore::Transaction t;
-      t.clone(cid, hoid3, hoid3_cloned);
-      r = queue_transaction(store, ch, std::move(t));
-      ASSERT_EQ(r, 0);
-    }
-
-    bstore->umount();
-    // depending on statfs tracking we might meet or miss relevant error
-    // hence error count >= 3
-    ASSERT_GE(bstore->fsck(false), 3);
-    ASSERT_LE(bstore->repair(false), 0);
-    ASSERT_EQ(bstore->fsck(false), 0);
-  }
-
   cerr << "Zombie spanning blob" << std::endl;
   {
     bstore->mount();