Lines Matching refs:ret

27 	int ret;
41 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size);
42 if (ret) {
43 test_err("couldn't insert ref %d", ret);
45 return ret;
76 int ret;
90 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1);
91 if (ret) {
94 return ret;
112 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0);
113 if (ret)
116 return ret;
125 int ret;
139 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1);
140 if (ret) {
141 test_err("didn't find our key %d", ret);
143 return ret;
158 int ret;
172 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1);
173 if (ret) {
176 return ret;
194 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1);
195 if (ret) {
196 test_err("couldn't find backref %d", ret);
198 return ret;
202 return ret;
213 int ret;
218 ret = btrfs_create_qgroup(&trans, BTRFS_FS_TREE_OBJECTID);
219 if (ret) {
220 test_err("couldn't create a qgroup %d", ret);
221 return ret;
233 ret = btrfs_find_all_roots(&ctx, false);
234 if (ret) {
235 test_err("couldn't find old roots: %d", ret);
236 return ret;
241 ret = insert_normal_tree_ref(root, nodesize, nodesize, 0,
243 if (ret) {
245 return ret;
248 ret = btrfs_find_all_roots(&ctx, false);
249 if (ret) {
251 test_err("couldn't find old roots: %d", ret);
252 return ret;
257 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots,
259 if (ret) {
260 test_err("couldn't account space for a qgroup %d", ret);
261 return ret;
274 ret = btrfs_find_all_roots(&ctx, false);
275 if (ret) {
276 test_err("couldn't find old roots: %d", ret);
277 return ret;
282 ret = remove_extent_item(root, nodesize, nodesize);
283 if (ret) {
288 ret = btrfs_find_all_roots(&ctx, false);
289 if (ret) {
291 test_err("couldn't find old roots: %d", ret);
292 return ret;
297 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots,
299 if (ret) {
300 test_err("couldn't account space for a qgroup %d", ret);
325 int ret;
335 ret = btrfs_create_qgroup(&trans, BTRFS_FIRST_FREE_OBJECTID);
336 if (ret) {
337 test_err("couldn't create a qgroup %d", ret);
338 return ret;
345 ret = btrfs_find_all_roots(&ctx, false);
346 if (ret) {
347 test_err("couldn't find old roots: %d", ret);
348 return ret;
353 ret = insert_normal_tree_ref(root, nodesize, nodesize, 0,
355 if (ret) {
357 return ret;
360 ret = btrfs_find_all_roots(&ctx, false);
361 if (ret) {
363 test_err("couldn't find old roots: %d", ret);
364 return ret;
369 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots,
371 if (ret) {
372 test_err("couldn't account space for a qgroup %d", ret);
373 return ret;
382 ret = btrfs_find_all_roots(&ctx, false);
383 if (ret) {
384 test_err("couldn't find old roots: %d", ret);
385 return ret;
390 ret = add_tree_ref(root, nodesize, nodesize, 0,
392 if (ret) {
394 return ret;
397 ret = btrfs_find_all_roots(&ctx, false);
398 if (ret) {
400 test_err("couldn't find old roots: %d", ret);
401 return ret;
406 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots,
408 if (ret) {
409 test_err("couldn't account space for a qgroup %d", ret);
410 return ret;
425 ret = btrfs_find_all_roots(&ctx, false);
426 if (ret) {
427 test_err("couldn't find old roots: %d", ret);
428 return ret;
433 ret = remove_extent_ref(root, nodesize, nodesize, 0,
435 if (ret) {
437 return ret;
440 ret = btrfs_find_all_roots(&ctx, false);
441 if (ret) {
443 test_err("couldn't find old roots: %d", ret);
444 return ret;
449 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots,
451 if (ret) {
452 test_err("couldn't account space for a qgroup %d", ret);
453 return ret;
476 int ret = 0;
487 ret = PTR_ERR(root);
512 ret = PTR_ERR(root->node);
522 ret = PTR_ERR(tmp_root);
528 ret = btrfs_insert_fs_root(root->fs_info, tmp_root);
529 if (ret) {
530 test_err("couldn't insert fs root %d", ret);
538 ret = PTR_ERR(tmp_root);
543 ret = btrfs_insert_fs_root(root->fs_info, tmp_root);
544 if (ret) {
545 test_err("couldn't insert fs root %d", ret);
551 ret = test_no_shared_qgroup(root, sectorsize, nodesize);
552 if (ret)
554 ret = test_multiple_refs(root, sectorsize, nodesize);
558 return ret;