block: vhdx: Use AlignedFile for O_DIRECT-safe I/O

By redirecting VHDx I/O through the AlignedFile the required RMW
semantics can be achieved for writes less than the logical block size
whilt reusing the same logic used for other backend implementations.

Assisted-by: Claude:Opus-4.8
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-06-12 10:23:22 +01:00
parent 80a0393edd
commit b4c1d85327
9 changed files with 169 additions and 115 deletions

View File

@@ -22,7 +22,7 @@ fuzz_target!(|bytes: &[u8]| -> Corpus {
disk_file.write_all(&bytes[..]).unwrap();
disk_file.seek(SeekFrom::Start(0)).unwrap();
let mut vhdx = match Vhdx::new(disk_file) {
let mut vhdx = match Vhdx::new(disk_file, false) {
Ok(vhdx) => vhdx,
Err(_) => return Corpus::Reject,
};