btrfs-progs: make reada_for_search static

We were using this in cmds/restore.c, however it only does anything if
path->reada is set, and we don't set that in cmds/restore.c.  Remove
this usage of reada_for_search and make the function static.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2023-04-19 17:24:00 -04:00 committed by David Sterba
parent b3477244f9
commit 75262a2a0f
3 changed files with 3 additions and 9 deletions

View File

@ -267,9 +267,6 @@ again:
continue;
}
if (path->reada)
reada_for_search(fs_info, path, level, slot, 0);
next = read_node_slot(fs_info, c, slot);
if (extent_buffer_uptodate(next))
break;
@ -284,8 +281,6 @@ again:
path->slots[level] = 0;
if (!level)
break;
if (path->reada)
reada_for_search(fs_info, path, level, 0, 0);
next = read_node_slot(fs_info, next, 0);
if (!extent_buffer_uptodate(next))
goto again;

View File

@ -1205,8 +1205,9 @@ static int noinline push_nodes_for_insert(struct btrfs_trans_handle *trans,
/*
* readahead one full node of leaves
*/
void reada_for_search(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
int level, int slot, u64 objectid)
static void reada_for_search(struct btrfs_fs_info *fs_info,
struct btrfs_path *path, int level, int slot,
u64 objectid)
{
struct extent_buffer *node;
struct btrfs_disk_key disk_key;

View File

@ -929,8 +929,6 @@ 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);
void reada_for_search(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
int level, int slot, u64 objectid);
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,