Lines Matching refs:subvol_id

466 int btrfs_subvol_get_info_fd(int fd, uint64_t subvol_id, BtrfsSubvolInfo *ret) {
489 if (subvol_id == 0) {
490 r = btrfs_subvol_get_id_fd(fd, &subvol_id);
501 args.key.min_objectid = args.key.max_objectid = subvol_id;
521 if (sh->objectid != subvol_id)
535 ret->subvol_id = subvol_id;
682 int btrfs_subvol_find_subtree_qgroup(int fd, uint64_t subvol_id, uint64_t *ret) {
699 if (subvol_id == 0) {
700 r = btrfs_subvol_get_id_fd(fd, &subvol_id);
705 r = btrfs_qgroupid_split(subvol_id, &level, NULL);
711 n = btrfs_qgroup_find_parents(fd, subvol_id, &qgroups);
722 if (id != subvol_id)
736 *ret = subvol_id;
744 int btrfs_subvol_get_subtree_quota_fd(int fd, uint64_t subvol_id, BtrfsQuotaInfo *ret) {
758 r = btrfs_subvol_find_subtree_qgroup(fd, subvol_id, &qgroupid);
765 int btrfs_subvol_get_subtree_quota(const char *path, uint64_t subvol_id, BtrfsQuotaInfo *ret) {
772 return btrfs_subvol_get_subtree_quota_fd(fd, subvol_id, ret);
884 int btrfs_subvol_set_subtree_quota_limit_fd(int fd, uint64_t subvol_id, uint64_t referenced_max) {
890 r = btrfs_subvol_find_subtree_qgroup(fd, subvol_id, &qgroupid);
897 int btrfs_subvol_set_subtree_quota_limit(const char *path, uint64_t subvol_id, uint64_t referenced_max) {
904 return btrfs_subvol_set_subtree_quota_limit_fd(fd, subvol_id, referenced_max);
1069 uint64_t subvol_id;
1077 r = btrfs_qgroupid_split(qgroupid, NULL, &subvol_id);
1096 if (id != subvol_id)
1183 static int subvol_remove_children(int fd, const char *subvolume, uint64_t subvol_id, BtrfsRemoveFlags flags) {
1216 if (subvol_id == 0) {
1217 r = btrfs_subvol_get_id_fd(subvol_fd, &subvol_id);
1226 (void) btrfs_qgroup_destroy_recursive(fd, subvol_id); /* for the leaf subvolumes, the qgroup id is identical to the subvol id */
1235 args.key.min_offset = args.key.max_offset = subvol_id;
1257 if (sh->offset != subvol_id)
1267 ino_args.treeid = subvol_id;
1312 (void) btrfs_qgroup_destroy_recursive(fd, subvol_id);
1857 int btrfs_subvol_auto_qgroup_fd(int fd, uint64_t subvol_id, bool insert_intermediary_qgroup) {
1902 if (subvol_id == 0) {
1909 r = btrfs_subvol_get_id_fd(fd, &subvol_id);
1914 n = btrfs_qgroup_find_parents(fd, subvol_id, &qgroups);
1922 r = btrfs_subvol_get_parent(fd, subvol_id, &parent_subvol);
1956 r = btrfs_qgroupid_make(lowest - 1, subvol_id, &new_qgroupid);
1979 r = btrfs_qgroup_assign(fd, subvol_id, new_qgroupid);
1994 r = btrfs_qgroup_assign(fd, subvol_id, qgroups[i]);
2005 int btrfs_subvol_auto_qgroup(const char *path, uint64_t subvol_id, bool create_intermediary_qgroup) {
2012 return btrfs_subvol_auto_qgroup_fd(fd, subvol_id, create_intermediary_qgroup);
2015 int btrfs_subvol_get_parent(int fd, uint64_t subvol_id, uint64_t *ret) {
2037 if (subvol_id == 0) {
2038 r = btrfs_subvol_get_id_fd(fd, &subvol_id);
2049 args.key.min_objectid = args.key.max_objectid = subvol_id;
2066 if (sh->objectid != subvol_id)