mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: qcow_sync: impl DiskFd for QcowDiskSync
Borrows the raw file descriptor from the underlying QcowRawFile for fcntl() operations. Uses &self for shared access. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
4b731ee771
commit
b305a7670b
@@ -290,6 +290,12 @@ impl disk_file::PhysicalSize for QcowDiskSync {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl disk_file::DiskFd for QcowDiskSync {
|
||||||
|
fn fd(&self) -> BorrowedDiskFd<'_> {
|
||||||
|
BorrowedDiskFd::new(self.data_raw_file.as_fd().as_raw_fd())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct QcowSync {
|
pub struct QcowSync {
|
||||||
metadata: Arc<QcowMetadata>,
|
metadata: Arc<QcowMetadata>,
|
||||||
data_file: QcowRawFile,
|
data_file: QcowRawFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user