From 0bdf21b3acdfb125249d446aea0065fff1c5e459 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 29 Mar 2022 16:33:40 +0800 Subject: [PATCH] retire debugging infos --- services/pddb/src/backend/basis.rs | 6 ++++++ services/pddb/src/backend/dictionary.rs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/services/pddb/src/backend/basis.rs b/services/pddb/src/backend/basis.rs index 00f889b71..ec2aec5c9 100644 --- a/services/pddb/src/backend/basis.rs +++ b/services/pddb/src/backend/basis.rs @@ -916,6 +916,7 @@ impl BasisCache { for page in basis.v2p_map.values_mut() { hw.trng_slice(&mut temp); hw.patch_data(&temp, page.page_number() * PAGE_SIZE as u32); + log::trace!("fast_space_free basis delete {} before", page.journal()); hw.fast_space_free(page); } basis.pt_sync(hw); @@ -1182,10 +1183,14 @@ impl BasisCacheEntry { hw.trng_slice(&mut random); hw.patch_data(&random, pp.page_number() * PAGE_SIZE as u32); } + log::trace!("fast_space_free small page delete {} before", pp.journal()); hw.fast_space_free(pp); assert!(pp.valid() == false, "pp is still marked as valid!"); } } + /* for pp in self.v2p_map.values() { + log::info!("v2p entry: {:x?}", pp); + } */ // erase the entire dictionary + key allocation area by writing over with random data. It's important to // do a comprehensive erase, because if the dictionary slot is re-used, the previously allocated key entries // decrypt correctly, are interpreted as valid keys, and thus cause consistency errors. @@ -1199,6 +1204,7 @@ impl BasisCacheEntry { let mut random = [0u8; PAGE_SIZE]; hw.trng_slice(&mut random); hw.patch_data(&random, pp.page_number() * PAGE_SIZE as u32); + log::trace!("fast_space_free dict_delete {} before", pp.journal()); hw.fast_space_free(pp); assert!(pp.valid() == false, "pp is still marked as valid!"); } else { diff --git a/services/pddb/src/backend/dictionary.rs b/services/pddb/src/backend/dictionary.rs index efcfca08b..4463caf06 100644 --- a/services/pddb/src/backend/dictionary.rs +++ b/services/pddb/src/backend/dictionary.rs @@ -536,6 +536,7 @@ impl DictCacheEntry { for vpage in (vpage_end_offset.as_u64()..kcache.start + kcache.reserved).step_by(VPAGE_SIZE) { if let Some(pp) = v2p_map.get_mut(&VirtAddr::new(vpage).unwrap()) { assert!(pp.valid(), "v2p returned an invalid page"); + log::trace!("fast_space_free key_update {} before", pp.journal()); hw.fast_space_free(pp); assert!(pp.valid() == false, "pp is still marked as valid!"); } @@ -726,6 +727,7 @@ impl DictCacheEntry { hw.trng_slice(&mut noise); hw.patch_data(&noise, pp.page_number() * PAGE_SIZE as u32); } + log::trace!("fast_space_free key_remove {} before", pp.journal()); hw.fast_space_free(pp); assert!(pp.valid() == false, "pp is still marked as valid!"); }