pub fn encoded_write(
fd: BorrowedFd<'_>,
data: &[u8],
offset: u64,
unencoded_file_len: u64,
unencoded_len: u64,
unencoded_offset: u64,
compression: u32,
encryption: u32,
) -> Result<()>Expand description
Write pre-compressed data to a file using BTRFS_IOC_ENCODED_WRITE.
This passes compressed data directly to the filesystem without
decompression, which is more efficient than decompressing and writing.
The kernel may reject the call with ENOTTY (old kernel), EINVAL
(unsupported parameters), or ENOSPC; callers should fall back to
manual decompression + pwrite in those cases.