Skip to main content

file_extent_same

Function file_extent_same 

Source
pub fn file_extent_same(
    src_fd: BorrowedFd<'_>,
    src_offset: u64,
    length: u64,
    targets: &[DedupeTarget],
) -> Result<Vec<DedupeResult>>
Expand description

Deduplicate a source range against one or more destination ranges.

Compares length bytes starting at src_offset in the file referred to by src_fd against each target. Where data matches, the destination extents are replaced with shared references to the source extent.

Returns one DedupeResult per target, in the same order.

ยงErrors

Returns Err if the ioctl fails. EINVAL if offsets or length are not sector-aligned, or if targets is empty. EPERM if destination files are not writable.