From 07c1de41d975459397945f2e6b2b7f5630912175 Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Sun, 3 Dec 2023 00:58:03 -0800 Subject: remove some assertions... --- ayafs-core/src/memory/cached_block.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ayafs-core/src/memory') diff --git a/ayafs-core/src/memory/cached_block.rs b/ayafs-core/src/memory/cached_block.rs index ae0f2a9..e4bcb2a 100644 --- a/ayafs-core/src/memory/cached_block.rs +++ b/ayafs-core/src/memory/cached_block.rs @@ -157,8 +157,7 @@ impl BlockCache { if self.cache.contains(&block.index) { let mut data_block = convert::(&block).clone(); data_block.dirty = true; // TODO 需要把显式写回的都标记为 dirty 吗 - let (entry, _value) = self.cache.push(block.index, data_block).unwrap(); - assert_eq!(entry, block.index); + self.cache.push(block.index, data_block).unwrap(); trace!("update_block(global_block_id: {})", block.index + self.global_offset); true } else { -- cgit v1.2.3-70-g09d2