@@ -311,9 +311,9 @@ enum btrfs_tree_block_status btrfs_check_block_for_repair(struct extent_buffer *
enum btrfs_tree_block_status status;
if (btrfs_is_leaf(eb))
- status = btrfs_check_leaf(eb);
+ status = __btrfs_check_leaf(eb);
else
- status = btrfs_check_node(eb);
+ status = __btrfs_check_node(eb);
if (status == BTRFS_TREE_BLOCK_CLEAN)
return status;
@@ -616,7 +616,7 @@ static void generic_err(const struct extent_buffer *buf, int slot,
fprintf(stderr, "\n");
}
-enum btrfs_tree_block_status btrfs_check_node(struct extent_buffer *node)
+enum btrfs_tree_block_status __btrfs_check_node(struct extent_buffer *node)
{
struct btrfs_fs_info *fs_info = node->fs_info;
unsigned long nr = btrfs_header_nritems(node);
@@ -677,7 +677,7 @@ fail:
return ret;
}
-enum btrfs_tree_block_status btrfs_check_leaf(struct extent_buffer *leaf)
+enum btrfs_tree_block_status __btrfs_check_leaf(struct extent_buffer *leaf)
{
struct btrfs_fs_info *fs_info = leaf->fs_info;
/* No valid key type is 0, so all key should be larger than this key */
@@ -789,9 +789,9 @@ static int noinline check_block(struct btrfs_fs_info *fs_info,
if (path->skip_check_block)
return 0;
if (level == 0)
- ret = btrfs_check_leaf(path->nodes[0]);
+ ret = __btrfs_check_leaf(path->nodes[0]);
else
- ret = btrfs_check_node(path->nodes[level]);
+ ret = __btrfs_check_node(path->nodes[level]);
if (ret == BTRFS_TREE_BLOCK_CLEAN)
return 0;
return -EIO;
@@ -958,8 +958,8 @@ int btrfs_convert_one_bg(struct btrfs_trans_handle *trans, u64 bytenr);
int btrfs_comp_cpu_keys(const struct btrfs_key *k1, const struct btrfs_key *k2);
int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
int level, int slot);
-enum btrfs_tree_block_status btrfs_check_node(struct extent_buffer *buf);
-enum btrfs_tree_block_status btrfs_check_leaf(struct extent_buffer *buf);
+enum btrfs_tree_block_status __btrfs_check_node(struct extent_buffer *buf);
+enum btrfs_tree_block_status __btrfs_check_leaf(struct extent_buffer *buf);
struct extent_buffer *read_node_slot(struct btrfs_fs_info *fs_info,
struct extent_buffer *parent, int slot);
int btrfs_previous_item(struct btrfs_root *root,
@@ -370,9 +370,9 @@ int btrfs_read_extent_buffer(struct extent_buffer *eb, u64 parent_transid,
* btrfs ins dump-tree.
*/
if (btrfs_header_level(eb))
- ret = btrfs_check_node(eb);
+ ret = __btrfs_check_node(eb);
else
- ret = btrfs_check_leaf(eb);
+ ret = __btrfs_check_leaf(eb);
if (!ret || candidate_mirror == mirror_num) {
btrfs_set_buffer_uptodate(eb);
return 0;
These helpers are called __btrfs_check_* in the kernel as they return the special enum to indicate what part of the leaf/node failed. Rename the uses in btrfs-progs to match the kernel naming convention to make it easier to sync that code. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- check/repair.c | 4 ++-- kernel-shared/ctree.c | 8 ++++---- kernel-shared/ctree.h | 4 ++-- kernel-shared/disk-io.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)