block: Implement SparseCapable trait for RawFileDiskAio

Add disk_file::SparseCapable trait implementation for
RawFileDiskAio. 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-27 23:49:15 -07:00
committed by Wei Liu
parent 190380c9ba
commit b7cf8737ac

View File

@@ -101,6 +101,12 @@ impl disk_file::Geometry for RawFileDiskAio {
}
}
impl disk_file::SparseCapable for RawFileDiskAio {
fn supports_sparse_operations(&self) -> bool {
probe_sparse_support(&self.file)
}
}
pub struct RawFileAsyncAio {
fd: RawFd,
ctx: aio::IoContext,