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:
Anatol Belski
2026-03-12 20:58:26 +01:00
committed by Rob Bradford
parent 4b731ee771
commit b305a7670b

View File

@@ -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 {
metadata: Arc<QcowMetadata>,
data_file: QcowRawFile,