• Home
  • Raw
  • Download

Lines Matching refs:ret

25 	int ret;  in insert_normal_tree_ref()  local
40 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size); in insert_normal_tree_ref()
41 if (ret) { in insert_normal_tree_ref()
42 test_err("couldn't insert ref %d", ret); in insert_normal_tree_ref()
44 return ret; in insert_normal_tree_ref()
75 int ret; in add_tree_ref() local
90 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in add_tree_ref()
91 if (ret) { in add_tree_ref()
94 return ret; in add_tree_ref()
112 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0); in add_tree_ref()
113 if (ret) in add_tree_ref()
116 return ret; in add_tree_ref()
125 int ret; in remove_extent_item() local
140 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1); in remove_extent_item()
141 if (ret) { in remove_extent_item()
142 test_err("didn't find our key %d", ret); in remove_extent_item()
144 return ret; in remove_extent_item()
159 int ret; in remove_extent_ref() local
174 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1); in remove_extent_ref()
175 if (ret) { in remove_extent_ref()
178 return ret; in remove_extent_ref()
196 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1); in remove_extent_ref()
197 if (ret) { in remove_extent_ref()
198 test_err("couldn't find backref %d", ret); in remove_extent_ref()
200 return ret; in remove_extent_ref()
204 return ret; in remove_extent_ref()
214 int ret; in test_no_shared_qgroup() local
219 ret = btrfs_create_qgroup(&trans, BTRFS_FS_TREE_OBJECTID); in test_no_shared_qgroup()
220 if (ret) { in test_no_shared_qgroup()
221 test_err("couldn't create a qgroup %d", ret); in test_no_shared_qgroup()
222 return ret; in test_no_shared_qgroup()
230 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_no_shared_qgroup()
232 if (ret) { in test_no_shared_qgroup()
233 test_err("couldn't find old roots: %d", ret); in test_no_shared_qgroup()
234 return ret; in test_no_shared_qgroup()
237 ret = insert_normal_tree_ref(root, nodesize, nodesize, 0, in test_no_shared_qgroup()
239 if (ret) { in test_no_shared_qgroup()
241 return ret; in test_no_shared_qgroup()
244 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_no_shared_qgroup()
246 if (ret) { in test_no_shared_qgroup()
248 test_err("couldn't find old roots: %d", ret); in test_no_shared_qgroup()
249 return ret; in test_no_shared_qgroup()
252 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots, in test_no_shared_qgroup()
254 if (ret) { in test_no_shared_qgroup()
255 test_err("couldn't account space for a qgroup %d", ret); in test_no_shared_qgroup()
256 return ret; in test_no_shared_qgroup()
269 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_no_shared_qgroup()
271 if (ret) { in test_no_shared_qgroup()
272 test_err("couldn't find old roots: %d", ret); in test_no_shared_qgroup()
273 return ret; in test_no_shared_qgroup()
276 ret = remove_extent_item(root, nodesize, nodesize); in test_no_shared_qgroup()
277 if (ret) { in test_no_shared_qgroup()
282 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_no_shared_qgroup()
284 if (ret) { in test_no_shared_qgroup()
286 test_err("couldn't find old roots: %d", ret); in test_no_shared_qgroup()
287 return ret; in test_no_shared_qgroup()
290 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots, in test_no_shared_qgroup()
292 if (ret) { in test_no_shared_qgroup()
293 test_err("couldn't account space for a qgroup %d", ret); in test_no_shared_qgroup()
317 int ret; in test_multiple_refs() local
327 ret = btrfs_create_qgroup(&trans, BTRFS_FIRST_FREE_OBJECTID); in test_multiple_refs()
328 if (ret) { in test_multiple_refs()
329 test_err("couldn't create a qgroup %d", ret); in test_multiple_refs()
330 return ret; in test_multiple_refs()
333 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_multiple_refs()
335 if (ret) { in test_multiple_refs()
336 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
337 return ret; in test_multiple_refs()
340 ret = insert_normal_tree_ref(root, nodesize, nodesize, 0, in test_multiple_refs()
342 if (ret) { in test_multiple_refs()
344 return ret; in test_multiple_refs()
347 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_multiple_refs()
349 if (ret) { in test_multiple_refs()
351 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
352 return ret; in test_multiple_refs()
355 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots, in test_multiple_refs()
357 if (ret) { in test_multiple_refs()
358 test_err("couldn't account space for a qgroup %d", ret); in test_multiple_refs()
359 return ret; in test_multiple_refs()
368 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_multiple_refs()
370 if (ret) { in test_multiple_refs()
371 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
372 return ret; in test_multiple_refs()
375 ret = add_tree_ref(root, nodesize, nodesize, 0, in test_multiple_refs()
377 if (ret) { in test_multiple_refs()
379 return ret; in test_multiple_refs()
382 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_multiple_refs()
384 if (ret) { in test_multiple_refs()
386 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
387 return ret; in test_multiple_refs()
390 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots, in test_multiple_refs()
392 if (ret) { in test_multiple_refs()
393 test_err("couldn't account space for a qgroup %d", ret); in test_multiple_refs()
394 return ret; in test_multiple_refs()
409 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, in test_multiple_refs()
411 if (ret) { in test_multiple_refs()
412 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
413 return ret; in test_multiple_refs()
416 ret = remove_extent_ref(root, nodesize, nodesize, 0, in test_multiple_refs()
418 if (ret) { in test_multiple_refs()
420 return ret; in test_multiple_refs()
423 ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &new_roots, in test_multiple_refs()
425 if (ret) { in test_multiple_refs()
427 test_err("couldn't find old roots: %d", ret); in test_multiple_refs()
428 return ret; in test_multiple_refs()
431 ret = btrfs_qgroup_account_extent(&trans, nodesize, nodesize, old_roots, in test_multiple_refs()
433 if (ret) { in test_multiple_refs()
434 test_err("couldn't account space for a qgroup %d", ret); in test_multiple_refs()
435 return ret; in test_multiple_refs()
458 int ret = 0; in btrfs_test_qgroups() local
469 ret = PTR_ERR(root); in btrfs_test_qgroups()
491 ret = PTR_ERR(root->node); in btrfs_test_qgroups()
501 ret = PTR_ERR(tmp_root); in btrfs_test_qgroups()
507 ret = btrfs_insert_fs_root(root->fs_info, tmp_root); in btrfs_test_qgroups()
508 if (ret) { in btrfs_test_qgroups()
509 test_err("couldn't insert fs root %d", ret); in btrfs_test_qgroups()
517 ret = PTR_ERR(tmp_root); in btrfs_test_qgroups()
522 ret = btrfs_insert_fs_root(root->fs_info, tmp_root); in btrfs_test_qgroups()
523 if (ret) { in btrfs_test_qgroups()
524 test_err("couldn't insert fs root %d", ret); in btrfs_test_qgroups()
530 ret = test_no_shared_qgroup(root, sectorsize, nodesize); in btrfs_test_qgroups()
531 if (ret) in btrfs_test_qgroups()
533 ret = test_multiple_refs(root, sectorsize, nodesize); in btrfs_test_qgroups()
537 return ret; in btrfs_test_qgroups()