Skip to main content

Module send_receive

Module send_receive 

Source
Expand description

§Send and receive: generating and applying btrfs send streams

The send side wraps BTRFS_IOC_SEND, which produces a binary stream representing the contents of a read-only subvolume (or the delta between a parent and child snapshot).

The receive side wraps the ioctls used when applying a send stream: marking a subvolume as received (SET_RECEIVED_SUBVOL), cloning extents between files (CLONE_RANGE), writing pre-compressed data (ENCODED_WRITE), and searching the UUID tree to locate subvolumes by their UUID or received UUID.

Structs§

SendFlags
Flags for the send ioctl.
SubvolumeSearchResult
Result of searching the UUID tree for a subvolume.

Functions§

clone_range
Clone a range of bytes from one file to another using BTRFS_IOC_CLONE_RANGE.
encoded_write
Write pre-compressed data to a file using BTRFS_IOC_ENCODED_WRITE.
received_subvol_set
Mark a subvolume as received by setting its received UUID and stransid.
send
Invoke BTRFS_IOC_SEND on the given subvolume.
subvolume_search_by_received_uuid
Search the UUID tree for a subvolume by its received UUID.
subvolume_search_by_uuid
Search the UUID tree for a subvolume by its UUID.