From: Adam Kupczyk Date: Mon, 21 Nov 2022 11:25:40 +0000 (+0000) Subject: os/bluestore: Remove inject_21040. X-Git-Tag: v19.0.0~486^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e099297cbfb0ffa6ede5603b867bbb509fdec4f;p=ceph.git os/bluestore: Remove inject_21040. Signed-off-by: Adam Kupczyk --- diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index fe08916d4954..39c61e1f5a8c 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -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 diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 38e554ed2808..2de13e899620 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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 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); diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 3b2820d8466a..60ce9ff05406 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -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();