Lines Matching defs:qgroupid

558 int btrfs_qgroup_get_quota_fd(int fd, uint64_t qgroupid, BtrfsQuotaInfo *ret) {
583 if (qgroupid == 0) {
584 r = btrfs_subvol_get_id_fd(fd, &qgroupid);
595 args.key.min_offset = args.key.max_offset = qgroupid;
619 if (sh->offset != qgroupid)
672 int btrfs_qgroup_get_quota(const char *path, uint64_t qgroupid, BtrfsQuotaInfo *ret) {
679 return btrfs_qgroup_get_quota_fd(fd, qgroupid, ret);
745 uint64_t qgroupid;
758 r = btrfs_subvol_find_subtree_qgroup(fd, subvol_id, &qgroupid);
762 return btrfs_qgroup_get_quota_fd(fd, qgroupid, ret);
832 int btrfs_qgroup_set_limit_fd(int fd, uint64_t qgroupid, uint64_t referenced_max) {
843 if (qgroupid == 0) {
844 r = btrfs_subvol_get_id_fd(fd, &qgroupid);
855 args.qgroupid = qgroupid;
874 int btrfs_qgroup_set_limit(const char *path, uint64_t qgroupid, uint64_t referenced_max) {
881 return btrfs_qgroup_set_limit_fd(fd, qgroupid, referenced_max);
885 uint64_t qgroupid;
890 r = btrfs_subvol_find_subtree_qgroup(fd, subvol_id, &qgroupid);
894 return btrfs_qgroup_set_limit_fd(fd, qgroupid, referenced_max);
1011 int btrfs_qgroupid_split(uint64_t qgroupid, uint64_t *level, uint64_t *id) {
1015 *level = qgroupid >> BTRFS_QGROUP_LEVEL_SHIFT;
1018 *id = qgroupid & ((UINT64_C(1) << BTRFS_QGROUP_LEVEL_SHIFT) - 1);
1023 static int qgroup_create_or_destroy(int fd, bool b, uint64_t qgroupid) {
1027 .qgroupid = qgroupid,
1059 int btrfs_qgroup_create(int fd, uint64_t qgroupid) {
1060 return qgroup_create_or_destroy(fd, true, qgroupid);
1063 int btrfs_qgroup_destroy(int fd, uint64_t qgroupid) {
1064 return qgroup_create_or_destroy(fd, false, qgroupid);
1067 int btrfs_qgroup_destroy_recursive(int fd, uint64_t qgroupid) {
1075 * qgroupid as the specified group. */
1077 r = btrfs_qgroupid_split(qgroupid, NULL, &subvol_id);
1081 n = btrfs_qgroup_find_parents(fd, qgroupid, &qgroups);
1092 r = btrfs_qgroup_unassign(fd, qgroupid, qgroups[i]);
1099 /* The parent qgroupid shares the same id part with
1105 return btrfs_qgroup_destroy(fd, qgroupid);
1402 .qgroupid = new_qgroupid,
1769 int btrfs_qgroup_find_parents(int fd, uint64_t qgroupid, uint64_t **ret) {
1794 if (qgroupid == 0) {
1795 r = btrfs_subvol_get_id_fd(fd, &qgroupid);
1806 args.key.min_objectid = args.key.max_objectid = qgroupid;
1832 if (sh->objectid != qgroupid)