diff --git a/block/src/formats/qcow/internal/mod.rs b/block/src/formats/qcow/internal/mod.rs index 96606e1da..bb695e815 100644 --- a/block/src/formats/qcow/internal/mod.rs +++ b/block/src/formats/qcow/internal/mod.rs @@ -664,7 +664,7 @@ pub(crate) fn parse_qcow( /// # Example /// /// ``` -/// # use block::qcow::{self, QcowFile, RawFile}; +/// # use block::formats::qcow::internal::{QcowFile, RawFile}; /// # use std::io::{Read, Seek, SeekFrom}; /// # fn test(file: std::fs::File) -> std::io::Result<()> { /// let mut raw_img = RawFile::new(file, false); diff --git a/block/src/lib.rs b/block/src/lib.rs index f02ab2b0a..986d5e509 100644 --- a/block/src/lib.rs +++ b/block/src/lib.rs @@ -27,7 +27,7 @@ use std::path::Path; use std::str::FromStr; use std::{cmp, mem, result}; -pub use formats::qcow::internal as qcow; +use formats::qcow::internal as qcow; pub use formats::vhdx::internal as vhdx; #[cfg(feature = "io_uring")] use io_uring::{IoUring, Probe, opcode}; diff --git a/cloud-hypervisor/tests/common/utils.rs b/cloud-hypervisor/tests/common/utils.rs index 5e2967c7a..6a0ce7449 100644 --- a/cloud-hypervisor/tests/common/utils.rs +++ b/cloud-hypervisor/tests/common/utils.rs @@ -14,6 +14,7 @@ use std::sync::mpsc::Receiver; use std::time::{Duration, Instant}; use std::{cmp, fs, io, thread}; +use block::formats::qcow::internal::ImageType as QcowImageType; use test_infra::*; use vmm_sys_util::tempdir::TempDir; #[cfg(not(feature = "mshv"))] @@ -947,7 +948,7 @@ pub(crate) fn disk_check_consistency( } if let Some((backing_path, format, initial_checksum)) = initial_backing_checksum { - if format.parse::().ok() != Some(block::qcow::ImageType::Raw) { + if format.parse::().ok() != Some(QcowImageType::Raw) { let output = run_qemu_img(&backing_path, &["check"], None); assert!( diff --git a/fuzz/fuzz_targets/qcow.rs b/fuzz/fuzz_targets/qcow.rs index 900d24f9b..e0ab53c65 100644 --- a/fuzz/fuzz_targets/qcow.rs +++ b/fuzz/fuzz_targets/qcow.rs @@ -11,7 +11,7 @@ use std::io::{self, Cursor, Read, Seek, SeekFrom, Write}; use std::mem::size_of; use std::os::unix::io::{FromRawFd, RawFd}; -use block::qcow::{QcowFile, RawFile}; +use block::formats::qcow::internal::{QcowFile, RawFile}; use libfuzzer_sys::{fuzz_target, Corpus}; // Take the first 64 bits of data as an address and the next 64 bits as data to diff --git a/performance-metrics/src/util.rs b/performance-metrics/src/util.rs index dc632970d..b4cafa300 100644 --- a/performance-metrics/src/util.rs +++ b/performance-metrics/src/util.rs @@ -16,7 +16,7 @@ use std::time::Duration; use block::async_io::{AsyncIo, GuestMemoryTarget}; use block::formats::qcow::QcowDisk; -use block::qcow::{BackingFileConfig, ImageType, QcowFile, RawFile}; +use block::formats::qcow::internal::{BackingFileConfig, ImageType, QcowFile, RawFile}; use vm_memory::{Bytes, GuestAddress, GuestMemoryMmap}; use vmm_sys_util::eventfd::EventFd; use vmm_sys_util::tempfile::TempFile; diff --git a/vhost_user_block/src/lib.rs b/vhost_user_block/src/lib.rs index cc6ace69b..8530aa36a 100644 --- a/vhost_user_block/src/lib.rs +++ b/vhost_user_block/src/lib.rs @@ -19,7 +19,7 @@ use std::sync::{Arc, Mutex, RwLock, RwLockWriteGuard}; use std::time::Instant; use std::{convert, io, process, result}; -use block::qcow::RawFile; +use block::formats::qcow::internal::RawFile; use block::{Request, RequestType, VirtioBlockConfig, build_serial}; use libc::EFD_NONBLOCK; use log::{debug, error, info, warn};