[][src]Module btrfsutil::bindings

Raw bindings to libbtrfsutil.

Structs

btrfs_util_qgroup_inherit
btrfs_util_subvolume_info

struct btrfs_util_subvolume_info - Information about a Btrfs subvolume.

btrfs_util_subvolume_iterator
timespec

Constants

BTRFS_FS_TREE_OBJECTID

Id of the root subvolume in a Btrfs filesystem.

BTRFS_UTIL_CREATE_SNAPSHOT_MASK
BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY
BTRFS_UTIL_CREATE_SNAPSHOT_RECURSIVE
BTRFS_UTIL_DELETE_SUBVOLUME_MASK
BTRFS_UTIL_DELETE_SUBVOLUME_RECURSIVE
BTRFS_UTIL_SUBVOLUME_ITERATOR_MASK
BTRFS_UTIL_SUBVOLUME_ITERATOR_POST_ORDER
btrfs_util_error_BTRFS_UTIL_ERROR_DEFAULT_SUBVOL_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_FS_INFO_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_GET_SUBVOL_INFO_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_GET_SUBVOL_ROOTREF_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_INO_LOOKUP_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_INO_LOOKUP_USER_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_INVALID_ARGUMENT
btrfs_util_error_BTRFS_UTIL_ERROR_NOT_BTRFS
btrfs_util_error_BTRFS_UTIL_ERROR_NOT_SUBVOLUME
btrfs_util_error_BTRFS_UTIL_ERROR_NO_MEMORY
btrfs_util_error_BTRFS_UTIL_ERROR_OPEN_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_RMDIR_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SEARCH_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SNAP_CREATE_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SNAP_DESTROY_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_START_SYNC_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_STATFS_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_STAT_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_STOP_ITERATION
btrfs_util_error_BTRFS_UTIL_ERROR_SUBVOLUME_NOT_FOUND
btrfs_util_error_BTRFS_UTIL_ERROR_SUBVOL_CREATE_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SUBVOL_GETFLAGS_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SUBVOL_SETFLAGS_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_SYNC_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_UNLINK_FAILED
btrfs_util_error_BTRFS_UTIL_ERROR_WAIT_SYNC_FAILED
btrfs_util_error_BTRFS_UTIL_OK

Functions

btrfs_util_create_qgroup_inherit

btrfs_util_create_qgroup_inherit() - Create a qgroup inheritance specifier for btrfs_util_create_subvolume() or btrfs_util_create_snapshot(). @flags: Must be zero. @ret: Returned qgroup inheritance specifier.

btrfs_util_create_snapshot

btrfs_util_create_snapshot() - Create a new snapshot from a source subvolume path. @source: Path of the existing subvolume to snapshot. @path: Where to create the snapshot. @flags: Bitmask of BTRFS_UTIL_CREATE_SNAPSHOT_* flags. @async_transid: See btrfs_util_create_subvolume(). If %BTRFS_UTIL_CREATE_SNAPSHOT_RECURSIVE was in @flags, then this will contain the largest transaction ID of all created subvolumes. @qgroup_inherit: See btrfs_util_create_subvolume().

btrfs_util_create_snapshot_fd

btrfs_util_create_snapshot_fd() - See btrfs_util_create_snapshot().

btrfs_util_create_snapshot_fd2

btrfs_util_create_snapshot_fd2() - Create a new snapshot from a source subvolume file descriptor and a target parent file descriptor and name. @fd: File descriptor of the existing subvolume to snapshot. @parent_fd: File descriptor of the parent directory where the snapshot should be created. @name: Name of the snapshot to create. @flags: See btrfs_util_create_snapshot(). @async_transid: See btrfs_util_create_snapshot(). @qgroup_inherit: See btrfs_util_create_snapshot().

btrfs_util_create_subvolume

btrfs_util_create_subvolume() - Create a new subvolume. @path: Where to create the subvolume. @flags: Must be zero. @async_transid: If not NULL, create the subvolume asynchronously (i.e., without waiting for it to commit it to disk) and return the transaction ID that it was created in. This transaction ID can be waited on with btrfs_util_wait_sync(). @qgroup_inherit: Qgroups to inherit from, or NULL.

btrfs_util_create_subvolume_fd

btrfs_util_create_subvolume_fd() - Create a new subvolume given its parent and name. @parent_fd: File descriptor of the parent directory where the subvolume should be created. @name: Name of the subvolume to create. @flags: See btrfs_util_create_subvolume(). @async_transid: See btrfs_util_create_subvolume(). @qgroup_inherit: See btrfs_util_create_subvolume().

btrfs_util_create_subvolume_iterator

btrfs_util_create_subvolume_iterator() - Create an iterator over subvolumes in a Btrfs filesystem. @path: Path in a Btrfs filesystem. This may be any path in the filesystem; it does not have to refer to a subvolume unless @top is zero. @top: List subvolumes beneath (but not including) the subvolume with this ID. If zero is given, the subvolume ID of @path is used. To list all subvolumes, pass %BTRFS_FS_TREE_OBJECTID (i.e., 5). The returned paths are relative to the subvolume with this ID. @flags: Bitmask of BTRFS_UTIL_SUBVOLUME_ITERATOR_* flags. @ret: Returned iterator.

btrfs_util_create_subvolume_iterator_fd

btrfs_util_create_subvolume_iterator_fd() - See btrfs_util_create_subvolume_iterator().

btrfs_util_delete_subvolume

btrfs_util_delete_subvolume() - Delete a subvolume or snapshot. @path: Path of the subvolume to delete. @flags: Bitmask of BTRFS_UTIL_DELETE_SUBVOLUME_* flags.

btrfs_util_delete_subvolume_by_id_fd

btrfs_util_delete_subvolume_by_id_fd() - Delete a subvolume or snapshot using subvolume id. @fd: File descriptor of the subvolume's parent directory. @subvolid: Subvolume id of the subvolume or snapshot to be deleted.

btrfs_util_delete_subvolume_fd

btrfs_util_delete_subvolume_fd() - Delete a subvolume or snapshot given its parent and name. @parent_fd: File descriptor of the subvolume's parent directory. @name: Name of the subvolume. @flags: See btrfs_util_delete_subvolume().

btrfs_util_deleted_subvolumes

btrfs_util_deleted_subvolumes() - Get a list of subvolume which have been deleted but not yet cleaned up. @path: Path on a Btrfs filesystem. @ids: Returned array of subvolume IDs. @n: Returned number of IDs in the @ids array.

btrfs_util_deleted_subvolumes_fd

btrfs_util_deleted_subvolumes_fd() - See btrfs_util_deleted_subvolumes().

btrfs_util_destroy_qgroup_inherit

btrfs_util_destroy_qgroup_inherit() - Destroy a qgroup inheritance specifier previously created with btrfs_util_create_qgroup_inherit(). @inherit: Specifier to destroy.

btrfs_util_destroy_subvolume_iterator

btrfs_util_destroy_subvolume_iterator() - Destroy a subvolume iterator previously created by btrfs_util_create_subvolume_iterator(). @iter: Iterator to destroy.

btrfs_util_get_default_subvolume

btrfs_util_get_default_subvolume() - Get the default subvolume for a filesystem. @path: Path on a Btrfs filesystem. @id_ret: Returned subvolume ID.

btrfs_util_get_default_subvolume_fd

btrfs_util_get_default_subvolume_fd() - See btrfs_util_get_default_subvolume().

btrfs_util_get_subvolume_read_only

btrfs_util_get_subvolume_read_only() - Get whether a subvolume is read-only. @path: Subvolume path. @ret: Returned read-only flag.

btrfs_util_get_subvolume_read_only_fd

btrfs_util_get_subvolume_read_only_fd() - See btrfs_util_get_subvolume_read_only().

btrfs_util_is_subvolume

btrfs_util_is_subvolume() - Return whether a given path is a Btrfs subvolume. @path: Path to check.

btrfs_util_is_subvolume_fd

btrfs_util_is_subvolume_fd() - See btrfs_util_is_subvolume().

btrfs_util_qgroup_inherit_add_group

btrfs_util_qgroup_inherit_add_group() - Add inheritance from a qgroup to a qgroup inheritance specifier. @inherit: Specifier to modify. May be reallocated. @qgroupid: ID of qgroup to inherit from.

btrfs_util_qgroup_inherit_get_groups

btrfs_util_qgroup_inherit_get_groups() - Get the qgroups a qgroup inheritance specifier contains. @inherit: Qgroup inheritance specifier. @groups: Returned array of qgroup IDs. @n: Returned number of entries in the @groups array.

btrfs_util_set_default_subvolume

btrfs_util_set_default_subvolume() - Set the default subvolume for a filesystem. @path: Path in a Btrfs filesystem. This may be any path in the filesystem; it does not have to refer to a subvolume unless @id is zero. @id: ID of subvolume to set as the default. If zero is given, the subvolume ID of @path is used.

btrfs_util_set_default_subvolume_fd

btrfs_util_set_default_subvolume_fd() - See btrfs_util_set_default_subvolume().

btrfs_util_set_subvolume_read_only

btrfs_util_set_subvolume_read_only() - Set whether a subvolume is read-only. @path: Subvolume path. @read_only: New value of read-only flag.

btrfs_util_set_subvolume_read_only_fd

btrfs_util_set_subvolume_read_only_fd() - See btrfs_util_set_subvolume_read_only().

btrfs_util_start_sync

btrfs_util_start_sync() - Start a sync on a specific Btrfs filesystem but don't wait for it. @path: Path on a Btrfs filesystem. @transid: Returned transaction ID which can be waited on with btrfs_util_wait_sync(). This can be %NULL.

btrfs_util_start_sync_fd

btrfs_util_start_sync_fd() - See btrfs_util_start_sync().

btrfs_util_strerror

btrfs_util_strerror() - Convert a libtrfsutil error code to a string description. @err: The error to convert.

btrfs_util_subvolume_id

btrfs_util_subvolume_id() - Get the ID of the subvolume containing a path. @path: Path on a Btrfs filesystem. @id_ret: Returned subvolume ID.

btrfs_util_subvolume_id_fd

btrfs_util_subvolume_id_fd() - See btrfs_util_subvolume_id().

btrfs_util_subvolume_info

btrfs_util_subvolume_info() - Get information about a subvolume. @path: Path in a Btrfs filesystem. This may be any path in the filesystem; it does not have to refer to a subvolume unless @id is zero. @id: ID of subvolume to get information about. If zero is given, the subvolume ID of @path is used. @subvol: Returned subvolume information. This can be %NULL if you just want to check whether the subvolume exists; %BTRFS_UTIL_ERROR_SUBVOLUME_NOT_FOUND will be returned if it does not.

btrfs_util_subvolume_info_fd

btrfs_util_subvolume_info_fd() - See btrfs_util_subvolume_info().

btrfs_util_subvolume_iterator_fd

btrfs_util_subvolume_iterator_fd() - Get the file descriptor associated with a subvolume iterator. @iter: Iterator to get.

btrfs_util_subvolume_iterator_next

btrfs_util_subvolume_iterator_next() - Get the next subvolume from a subvolume iterator. @iter: Subvolume iterator. @path_ret: Returned subvolume path, relative to the subvolume ID used to create the iterator. May be %NULL. Must be freed with free(). @id_ret: Returned subvolume ID. May be %NULL.

btrfs_util_subvolume_iterator_next_info

btrfs_util_subvolume_iterator_next_info() - Get information about the next subvolume for a subvolume iterator. @iter: Subvolume iterator. @path_ret: See btrfs_util_subvolume_iterator_next(). @subvol: Returned subvolume information.

btrfs_util_subvolume_path

btrfs_util_subvolume_path() - Get the path of the subvolume with a given ID relative to the filesystem root. @path: Path on a Btrfs filesystem. @id: ID of subvolume to set as the default. If zero is given, the subvolume ID of @path is used. @path_ret: Returned path.

btrfs_util_subvolume_path_fd

btrfs_util_subvolume_path_fd() - See btrfs_util_subvolume_path().

btrfs_util_sync

btrfs_util_sync() - Force a sync on a specific Btrfs filesystem. @path: Path on a Btrfs filesystem.

btrfs_util_sync_fd

btrfs_util_sync_fd() - See btrfs_util_sync().

btrfs_util_wait_sync

btrfs_util_wait_sync() - Wait for a transaction with a given ID to sync. @path: Path on a Btrfs filesystem. @transid: Transaction ID to wait for, or zero for the current transaction.

btrfs_util_wait_sync_fd

btrfs_util_wait_sync_fd() - See btrfs_util_wait_sync().

Type Definitions

__syscall_slong_t
__time_t
__uint8_t
__uint64_t
btrfs_util_error

enum btrfs_util_error - libbtrfsutil error codes.

size_t