]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/ZonedFreelistManager: remove sanity checks
authorSage Weil <sage@newdream.net>
Mon, 18 Oct 2021 19:10:15 +0000 (14:10 -0500)
committerSage Weil <sage@newdream.net>
Fri, 29 Oct 2021 13:56:42 +0000 (09:56 -0400)
These were there when I was using the merge operator; not really needed
since it's just setting zeroed values now.

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/bluestore/ZonedFreelistManager.cc

index a940005e7a9909978f43ac3b13ad848a7a9a2654..3a5bce66fe5d10ee4793051f69d2b2fd452e1456 100644 (file)
@@ -361,15 +361,6 @@ void ZonedFreelistManager::mark_zone_to_clean_free(
 {
   dout(10) << __func__ << " zone 0x" << std::hex << zone << std::dec << dendl;
 
-  if (true) {
-    string key;
-    _key_encode_u64(zone, &key);
-    KeyValueDB::Iterator it = kvdb->get_iterator(info_prefix);
-    it->lower_bound(key);
-    zone_state_t zs;
-    load_zone_state_from_db(zone, zs, it);
-    dout(20) << __func__ << " before " << zs << dendl;
-  }
   KeyValueDB::Transaction txn = kvdb->get_transaction();
 
   zone_state_t empty_zone_state;
@@ -378,17 +369,4 @@ void ZonedFreelistManager::mark_zone_to_clean_free(
   // block here until this commits so that we don't end up starting to allocate and
   // write to the new zone before this fully commits.
   kvdb->submit_transaction_sync(txn);
-
-  if (true) {
-    // read it back to verify it is really zero!
-    string key;
-    _key_encode_u64(zone, &key);
-    KeyValueDB::Iterator it = kvdb->get_iterator(info_prefix);
-    it->lower_bound(key);
-    zone_state_t zs;
-    load_zone_state_from_db(zone, zs, it);
-    dout(20) << __func__ << " read back " << zs << dendl;
-    ceph_assert(zs.num_dead_bytes == 0);
-    ceph_assert(zs.write_pointer == 0);
-  }
 }