mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Both engines walked the same cluster mappings to serve a read from allocated clusters, the backing file, or zero fill. In the uring engine this walk was a separate helper, scatter_read_sync, reached only when the read was not a single contiguous allocated extent. In the sync engine the same loop sat directly in the read path. Move scatter_read_sync into common.rs and call it from both. The uring contiguous fast path stays in resolve_read, so those reads still offload to the ring. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>