Lines Matching refs:path
22 struct btrfs_path *path, in __check_free_space_extents() argument
34 info = search_free_space_info(trans, cache, path, 0); in __check_free_space_extents()
40 flags = btrfs_free_space_flags(path->nodes[0], info); in __check_free_space_extents()
41 extent_count = btrfs_free_space_extent_count(path->nodes[0], info); in __check_free_space_extents()
49 if (path->slots[0] != 0) in __check_free_space_extents()
53 while (++path->slots[0] < btrfs_header_nritems(path->nodes[0])) { in __check_free_space_extents()
54 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
59 bit = free_space_test_bit(cache, path, offset); in __check_free_space_extents()
83 if (btrfs_header_nritems(path->nodes[0]) != num_extents + 1 || in __check_free_space_extents()
84 path->slots[0] != 0) in __check_free_space_extents()
87 path->slots[0]++; in __check_free_space_extents()
88 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
98 btrfs_release_path(path); in __check_free_space_extents()
109 struct btrfs_path *path, in check_free_space_extents() argument
117 info = search_free_space_info(trans, cache, path, 0); in check_free_space_extents()
120 btrfs_release_path(path); in check_free_space_extents()
123 flags = btrfs_free_space_flags(path->nodes[0], info); in check_free_space_extents()
124 btrfs_release_path(path); in check_free_space_extents()
126 ret = __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
133 ret = convert_free_space_to_extents(trans, cache, path); in check_free_space_extents()
139 ret = convert_free_space_to_bitmaps(trans, cache, path); in check_free_space_extents()
145 return __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
152 struct btrfs_path *path, in test_empty_block_group() argument
159 return check_free_space_extents(trans, fs_info, cache, path, in test_empty_block_group()
166 struct btrfs_path *path, in test_remove_all() argument
172 ret = __remove_from_free_space_tree(trans, cache, path, in test_remove_all()
180 return check_free_space_extents(trans, fs_info, cache, path, in test_remove_all()
187 struct btrfs_path *path, in test_remove_beginning() argument
195 ret = __remove_from_free_space_tree(trans, cache, path, in test_remove_beginning()
202 return check_free_space_extents(trans, fs_info, cache, path, in test_remove_beginning()
210 struct btrfs_path *path, in test_remove_end() argument
218 ret = __remove_from_free_space_tree(trans, cache, path, in test_remove_end()
226 return check_free_space_extents(trans, fs_info, cache, path, in test_remove_end()
233 struct btrfs_path *path, in test_remove_middle() argument
242 ret = __remove_from_free_space_tree(trans, cache, path, in test_remove_middle()
250 return check_free_space_extents(trans, fs_info, cache, path, in test_remove_middle()
257 struct btrfs_path *path, in test_merge_left() argument
265 ret = __remove_from_free_space_tree(trans, cache, path, in test_merge_left()
272 ret = __add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_left()
279 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_left()
287 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_left()
294 struct btrfs_path *path, in test_merge_right() argument
302 ret = __remove_from_free_space_tree(trans, cache, path, in test_merge_right()
309 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_right()
317 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_right()
325 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_right()
332 struct btrfs_path *path, in test_merge_both() argument
340 ret = __remove_from_free_space_tree(trans, cache, path, in test_merge_both()
347 ret = __add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_both()
354 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_both()
361 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_both()
368 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_both()
375 struct btrfs_path *path, in test_merge_none() argument
385 ret = __remove_from_free_space_tree(trans, cache, path, in test_merge_none()
392 ret = __add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_none()
399 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_none()
406 ret = __add_to_free_space_tree(trans, cache, path, in test_merge_none()
413 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_none()
430 struct btrfs_path *path = NULL; in run_test() local
475 path = btrfs_alloc_path(); in run_test()
476 if (!path) { in run_test()
489 ret = convert_free_space_to_bitmaps(&trans, cache, path); in run_test()
496 ret = test_func(&trans, root->fs_info, cache, path, alignment); in run_test()
514 btrfs_free_path(path); in run_test()