Lines Matching refs:quota_root

351 	struct btrfs_root *quota_root = fs_info->quota_root;  in btrfs_read_qgroup_config()  local
386 ret = btrfs_search_slot_for_read(quota_root, &key, path, 1, 1); in btrfs_read_qgroup_config()
469 ret = btrfs_next_item(quota_root, path); in btrfs_read_qgroup_config()
483 ret = btrfs_search_slot_for_read(quota_root, &key, path, 1, 0); in btrfs_read_qgroup_config()
511 ret = btrfs_next_item(quota_root, path); in btrfs_read_qgroup_config()
606 struct btrfs_root *quota_root = trans->fs_info->quota_root; in add_qgroup_relation_item() local
618 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, 0); in add_qgroup_relation_item()
630 struct btrfs_root *quota_root = trans->fs_info->quota_root; in del_qgroup_relation_item() local
642 ret = btrfs_search_slot(trans, quota_root, &key, path, -1, 1); in del_qgroup_relation_item()
651 ret = btrfs_del_item(trans, quota_root, path); in del_qgroup_relation_item()
658 struct btrfs_root *quota_root, u64 qgroupid) in add_qgroup_item() argument
667 if (btrfs_is_testing(quota_root->fs_info)) in add_qgroup_item()
684 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, in add_qgroup_item()
703 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, in add_qgroup_item()
728 struct btrfs_root *quota_root = trans->fs_info->quota_root; in del_qgroup_item() local
739 ret = btrfs_search_slot(trans, quota_root, &key, path, -1, 1); in del_qgroup_item()
748 ret = btrfs_del_item(trans, quota_root, path); in del_qgroup_item()
755 ret = btrfs_search_slot(trans, quota_root, &key, path, -1, 1); in del_qgroup_item()
764 ret = btrfs_del_item(trans, quota_root, path); in del_qgroup_item()
774 struct btrfs_root *quota_root = trans->fs_info->quota_root; in update_qgroup_limit_item() local
790 ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1); in update_qgroup_limit_item()
817 struct btrfs_root *quota_root = fs_info->quota_root; in update_qgroup_info_item() local
836 ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1); in update_qgroup_info_item()
862 struct btrfs_root *quota_root = fs_info->quota_root; in update_qgroup_status_item() local
878 ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1); in update_qgroup_status_item()
949 struct btrfs_root *quota_root; in btrfs_quota_enable() local
977 if (fs_info->quota_root) in btrfs_quota_enable()
1022 if (fs_info->quota_root) in btrfs_quota_enable()
1031 quota_root = btrfs_create_tree(trans, BTRFS_QUOTA_TREE_OBJECTID); in btrfs_quota_enable()
1032 if (IS_ERR(quota_root)) { in btrfs_quota_enable()
1033 ret = PTR_ERR(quota_root); in btrfs_quota_enable()
1049 ret = btrfs_insert_empty_item(trans, quota_root, path, &key, in btrfs_quota_enable()
1092 ret = add_qgroup_item(trans, quota_root, in btrfs_quota_enable()
1136 ret = add_qgroup_item(trans, quota_root, BTRFS_FS_TREE_OBJECTID); in btrfs_quota_enable()
1176 fs_info->quota_root = quota_root; in btrfs_quota_enable()
1207 btrfs_put_root(quota_root); in btrfs_quota_enable()
1225 struct btrfs_root *quota_root; in btrfs_quota_disable() local
1237 if (!fs_info->quota_root) in btrfs_quota_disable()
1275 if (!fs_info->quota_root) in btrfs_quota_disable()
1279 quota_root = fs_info->quota_root; in btrfs_quota_disable()
1280 fs_info->quota_root = NULL; in btrfs_quota_disable()
1287 ret = btrfs_clean_quota_tree(trans, quota_root); in btrfs_quota_disable()
1293 ret = btrfs_del_root(trans, &quota_root->root_key); in btrfs_quota_disable()
1299 list_del(&quota_root->dirty_list); in btrfs_quota_disable()
1301 btrfs_tree_lock(quota_root->node); in btrfs_quota_disable()
1302 btrfs_clean_tree_block(quota_root->node); in btrfs_quota_disable()
1303 btrfs_tree_unlock(quota_root->node); in btrfs_quota_disable()
1304 btrfs_free_tree_block(trans, btrfs_root_id(quota_root), in btrfs_quota_disable()
1305 quota_root->node, 0, 1); in btrfs_quota_disable()
1307 btrfs_put_root(quota_root); in btrfs_quota_disable()
1466 if (!fs_info->quota_root) { in btrfs_add_qgroup_relation()
1529 if (!fs_info->quota_root) { in __del_qgroup_relation()
1590 struct btrfs_root *quota_root; in btrfs_create_qgroup() local
1595 if (!fs_info->quota_root) { in btrfs_create_qgroup()
1599 quota_root = fs_info->quota_root; in btrfs_create_qgroup()
1606 ret = add_qgroup_item(trans, quota_root, qgroupid); in btrfs_create_qgroup()
1632 if (!fs_info->quota_root) { in btrfs_remove_qgroup()
1691 if (!fs_info->quota_root) { in btrfs_limit_qgroup()
2672 BUG_ON(!fs_info->quota_root); in btrfs_qgroup_account_extent()
2822 if (!fs_info->quota_root) in btrfs_run_qgroups()
2867 struct btrfs_root *quota_root; in btrfs_qgroup_inherit() local
2896 quota_root = fs_info->quota_root; in btrfs_qgroup_inherit()
2897 if (!quota_root) { in btrfs_qgroup_inherit()
2924 ret = add_qgroup_item(trans, quota_root, objectid); in btrfs_qgroup_inherit()
3103 if (!fs_info->quota_root) in qgroup_reserve()
3187 if (!fs_info->quota_root) in btrfs_qgroup_free_refroot()
3400 trans = btrfs_start_transaction(fs_info->quota_root, 1); in btrfs_qgroup_rescan_worker()
4068 if (!fs_info->quota_root) in qgroup_convert_meta()