mirror of
https://github.com/kdave/btrfs-progs
synced 2025-05-03 16:37:55 +00:00
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:
parent
b3477244f9
commit
75262a2a0f
@ -267,9 +267,6 @@ again:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path->reada)
|
|
||||||
reada_for_search(fs_info, path, level, slot, 0);
|
|
||||||
|
|
||||||
next = read_node_slot(fs_info, c, slot);
|
next = read_node_slot(fs_info, c, slot);
|
||||||
if (extent_buffer_uptodate(next))
|
if (extent_buffer_uptodate(next))
|
||||||
break;
|
break;
|
||||||
@ -284,8 +281,6 @@ again:
|
|||||||
path->slots[level] = 0;
|
path->slots[level] = 0;
|
||||||
if (!level)
|
if (!level)
|
||||||
break;
|
break;
|
||||||
if (path->reada)
|
|
||||||
reada_for_search(fs_info, path, level, 0, 0);
|
|
||||||
next = read_node_slot(fs_info, next, 0);
|
next = read_node_slot(fs_info, next, 0);
|
||||||
if (!extent_buffer_uptodate(next))
|
if (!extent_buffer_uptodate(next))
|
||||||
goto again;
|
goto again;
|
||||||
|
@ -1205,8 +1205,9 @@ static int noinline push_nodes_for_insert(struct btrfs_trans_handle *trans,
|
|||||||
/*
|
/*
|
||||||
* readahead one full node of leaves
|
* readahead one full node of leaves
|
||||||
*/
|
*/
|
||||||
void reada_for_search(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
|
static void reada_for_search(struct btrfs_fs_info *fs_info,
|
||||||
int level, int slot, u64 objectid)
|
struct btrfs_path *path, int level, int slot,
|
||||||
|
u64 objectid)
|
||||||
{
|
{
|
||||||
struct extent_buffer *node;
|
struct extent_buffer *node;
|
||||||
struct btrfs_disk_key disk_key;
|
struct btrfs_disk_key disk_key;
|
||||||
|
@ -929,8 +929,6 @@ int btrfs_del_ptr(struct btrfs_root *root, struct btrfs_path *path,
|
|||||||
int level, int slot);
|
int level, int slot);
|
||||||
enum btrfs_tree_block_status btrfs_check_node(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);
|
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 *read_node_slot(struct btrfs_fs_info *fs_info,
|
||||||
struct extent_buffer *parent, int slot);
|
struct extent_buffer *parent, int slot);
|
||||||
int btrfs_previous_item(struct btrfs_root *root,
|
int btrfs_previous_item(struct btrfs_root *root,
|
||||||
|
Loading…
Reference in New Issue
Block a user