mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: Move VHDX format files into formats/vhdx/
Move VHDX format implementation into a structured directory layout: vhdx/mod.rs -> formats/vhdx/internal/mod.rs (Vhdx) vhdx/vhdx_bat.rs -> formats/vhdx/internal/bat.rs vhdx/vhdx_header.rs -> formats/vhdx/internal/header.rs vhdx/vhdx_io.rs -> formats/vhdx/internal/io.rs vhdx/vhdx_metadata.rs -> formats/vhdx/internal/metadata.rs vhdx_sync.rs -> formats/vhdx/mod.rs (VhdxDisk) Extract VhdxSync from vhdx_sync.rs into formats/vhdx/worker/sync.rs. Drop the vhdx_ prefix from internal file names since the parent directory already provides the namespace. Update all internal cross references to use the new module paths. Re-export formats::vhdx as vhdx_sync in lib.rs for backward compatibility. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
1ca0c39b4d
commit
b595f1dbc3
@@ -22,10 +22,6 @@ pub(crate) mod qcow_common;
|
||||
pub mod qcow_disk;
|
||||
pub(crate) mod qcow_sync;
|
||||
mod sparse;
|
||||
pub use formats::raw as raw_disk;
|
||||
pub mod vhdx;
|
||||
pub mod vhdx_sync;
|
||||
|
||||
use std::alloc::{Layout, alloc_zeroed};
|
||||
use std::fmt::{self, Debug};
|
||||
use std::fs::{File, OpenOptions};
|
||||
@@ -37,6 +33,8 @@ use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use std::{cmp, mem, result};
|
||||
|
||||
pub use formats::raw as raw_disk;
|
||||
pub use formats::vhdx::internal as vhdx;
|
||||
#[cfg(feature = "io_uring")]
|
||||
use io_uring::{IoUring, Probe, opcode};
|
||||
use libc::{
|
||||
@@ -54,8 +52,8 @@ use vmm_sys_util::{aio, ioctl_io_nr, ioctl_ior_nr};
|
||||
|
||||
use crate::async_io::AsyncIoError;
|
||||
use crate::error::{BlockError, BlockErrorKind, BlockResult, ErrorOp};
|
||||
use crate::formats::vhdx::VhdxError;
|
||||
use crate::request::SECTOR_SIZE;
|
||||
use crate::vhdx::VhdxError;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
|
||||
Reference in New Issue
Block a user