block: Implement SparseCapable trait for RawFileDisk

Add disk_file::SparseCapable trait implementation for
RawFileDisk. Delegates to probe_sparse_support() to detect
whether the underlying file supports hole-punching.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-03-24 17:25:05 -07:00
committed by Bo Chen
parent 7e514d8d0e
commit 899dec4c04

View File

@@ -105,6 +105,12 @@ impl disk_file::Geometry for RawFileDisk {
}
}
impl disk_file::SparseCapable for RawFileDisk {
fn supports_sparse_operations(&self) -> bool {
probe_sparse_support(&self.file)
}
}
pub struct RawFileAsync {
fd: RawFd,
io_uring: IoUring,