mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
The refcount block read and write helpers took a file whose cursor was positioned by a preceding seek. Pass the target offset down instead and use positional read_exact_at and write_all_at on the AlignedFile, so the block methods no longer seek. The byte aligned and sub byte writers build a buffer and issue one positional write, keeping the previous batching. The result is unchanged, as the calls still route through the AlignedFile O_DIRECT bounce. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>