cloud-hypervisor/block
Anatol Belski 5c5f33050c block: qcow: Refactor pointer table writes to use iterators
Refactor write_pointer_table to accept iterators instead of requiring
materialized vectors, eliminating temporary allocations in L1 table
sync operations.

Changes:
- Modified write_pointer_table() to take Iterator<Item = &T> and
  dereference internally before passing owned values to the callback
- Added write_pointer_table_direct() convenience wrapper for cases
  without value transformation
- Updated sync_caches() to use l1_table.iter() directly instead of
  .get_values().iter().copied()
- Implemented Deref<Target = [T]> for VecCache to enable direct .iter()

Performance impact:
- Eliminates L1 table allocation during sync (~2KB per 100GB disk)
- L2 and refcount table writes already used slices, no change there
- Zero performance overhead: iterator dereferencing is equivalent to
  .copied() and optimizes identically

The L1 sync previously collected entries into a Vec to apply the
OFLAG_COPIED flag. The new iterator+callback pattern computes this
on-the-fly, avoiding the allocation entirely.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2025-12-10 23:35:46 +00:00
..
src block: qcow: Refactor pointer table writes to use iterators 2025-12-10 23:35:46 +00:00
Cargo.toml build: Bump the non-rust-vmm group across 2 directories with 38 updates 2025-11-25 11:12:36 +00:00