diff options
author | Omar Sandoval <osandov@fb.com> | 2018-01-24 12:48:59 -0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-03-06 11:28:37 +0100 |
commit | f23918016238a67b98740bdcb2509e290715977a (patch) | |
tree | 086a0297dc788c9536c934f32d43c9f990aa4486 /libbtrfsutil/btrfsutil.h | |
parent | 678da5a7f71ed7fbc887e40cc8ef91008c6fe843 (diff) |
libbtrfsutil: add btrfs_util_deleted_subvolumes()
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'libbtrfsutil/btrfsutil.h')
-rw-r--r-- | libbtrfsutil/btrfsutil.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libbtrfsutil/btrfsutil.h b/libbtrfsutil/btrfsutil.h index 6717b65f..6d655f49 100644 --- a/libbtrfsutil/btrfsutil.h +++ b/libbtrfsutil/btrfsutil.h @@ -581,6 +581,27 @@ enum btrfs_util_error btrfs_util_subvolume_iterator_next_info(struct btrfs_util_ struct btrfs_util_subvolume_info *subvol); /** + * 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. + * + * This requires appropriate privilege (CAP_SYS_ADMIN). + * + * Return: %BTRFS_UTIL_OK on success, non-zero error code on failure. + */ +enum btrfs_util_error btrfs_util_deleted_subvolumes(const char *path, + uint64_t **ids, + size_t *n); + +/** + * btrfs_util_deleted_subvolumes_fd() - See btrfs_util_deleted_subvolumes(). + */ +enum btrfs_util_error btrfs_util_deleted_subvolumes_fd(int fd, uint64_t **ids, + size_t *n); + +/** * btrfs_util_create_qgroup_inherit() - Create a qgroup inheritance specifier * for btrfs_util_create_subvolume() or btrfs_util_create_snapshot(). * @flags: Must be zero. |