Skip to main content

send

Function send 

Source
pub fn send(
    subvol_fd: BorrowedFd<'_>,
    send_fd: RawFd,
    parent_root: u64,
    clone_sources: &mut [u64],
    flags: SendFlags,
    version: u32,
) -> Result<()>
Expand description

Invoke BTRFS_IOC_SEND on the given subvolume.

The kernel writes the send stream to send_fd (the write end of a pipe). The caller is responsible for reading from the read end of the pipe, typically in a separate thread.

clone_sources is a list of root IDs that the kernel may reference for clone operations in the stream. parent_root is the root ID of the parent snapshot for incremental sends, or 0 for a full send.