Lines Matching refs:path
23 struct btrfs_path *path, in __check_free_space_extents() argument
35 info = btrfs_search_free_space_info(trans, cache, path, 0); in __check_free_space_extents()
41 flags = btrfs_free_space_flags(path->nodes[0], info); in __check_free_space_extents()
42 extent_count = btrfs_free_space_extent_count(path->nodes[0], info); in __check_free_space_extents()
50 if (path->slots[0] != 0) in __check_free_space_extents()
54 while (++path->slots[0] < btrfs_header_nritems(path->nodes[0])) { in __check_free_space_extents()
55 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
60 bit = btrfs_free_space_test_bit(cache, path, offset); in __check_free_space_extents()
84 if (btrfs_header_nritems(path->nodes[0]) != num_extents + 1 || in __check_free_space_extents()
85 path->slots[0] != 0) in __check_free_space_extents()
88 path->slots[0]++; in __check_free_space_extents()
89 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
99 btrfs_release_path(path); in __check_free_space_extents()
110 struct btrfs_path *path, in check_free_space_extents() argument
118 info = btrfs_search_free_space_info(trans, cache, path, 0); in check_free_space_extents()
121 btrfs_release_path(path); in check_free_space_extents()
124 flags = btrfs_free_space_flags(path->nodes[0], info); in check_free_space_extents()
125 btrfs_release_path(path); in check_free_space_extents()
127 ret = __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
134 ret = btrfs_convert_free_space_to_extents(trans, cache, path); in check_free_space_extents()
140 ret = btrfs_convert_free_space_to_bitmaps(trans, cache, path); in check_free_space_extents()
146 return __check_free_space_extents(trans, fs_info, cache, path, extents, in check_free_space_extents()
153 struct btrfs_path *path, in test_empty_block_group() argument
160 return check_free_space_extents(trans, fs_info, cache, path, in test_empty_block_group()
167 struct btrfs_path *path, in test_remove_all() argument
173 ret = __btrfs_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 = __btrfs_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 = __btrfs_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 = __btrfs_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 = __btrfs_remove_from_free_space_tree(trans, cache, path, in test_merge_left()
272 ret = __btrfs_add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_left()
279 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_left()
286 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_left()
293 struct btrfs_path *path, in test_merge_right() argument
301 ret = __btrfs_remove_from_free_space_tree(trans, cache, path, in test_merge_right()
308 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_right()
316 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_right()
323 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_right()
330 struct btrfs_path *path, in test_merge_both() argument
338 ret = __btrfs_remove_from_free_space_tree(trans, cache, path, in test_merge_both()
345 ret = __btrfs_add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_both()
352 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_both()
359 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_both()
366 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_both()
373 struct btrfs_path *path, in test_merge_none() argument
383 ret = __btrfs_remove_from_free_space_tree(trans, cache, path, in test_merge_none()
390 ret = __btrfs_add_to_free_space_tree(trans, cache, path, cache->start, in test_merge_none()
397 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_none()
404 ret = __btrfs_add_to_free_space_tree(trans, cache, path, in test_merge_none()
411 return check_free_space_extents(trans, fs_info, cache, path, in test_merge_none()
428 struct btrfs_path *path = NULL; in run_test() local
476 path = btrfs_alloc_path(); in run_test()
477 if (!path) { in run_test()
490 ret = btrfs_convert_free_space_to_bitmaps(&trans, cache, path); in run_test()
497 ret = test_func(&trans, root->fs_info, cache, path, alignment); in run_test()
515 btrfs_free_path(path); in run_test()