mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-25 20:47:58 +00:00
btrfs-progs: remove duplicate __setup_root
__setup_root() was present in find-root.c as well as disk-io.c. No need for the cut and paste, just use the one in disk-io.c Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Zach Brown <zab@redhat.com>
This commit is contained in:
parent
17cc7af982
commit
dbeedbed2a
@ -287,7 +287,7 @@ int write_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
|
int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
|
||||||
u32 stripesize, struct btrfs_root *root,
|
u32 stripesize, struct btrfs_root *root,
|
||||||
struct btrfs_fs_info *fs_info, u64 objectid)
|
struct btrfs_fs_info *fs_info, u64 objectid)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,10 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
|
|||||||
u64 parent_transid);
|
u64 parent_transid);
|
||||||
struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
|
struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
|
||||||
u64 bytenr, u32 blocksize);
|
u64 bytenr, u32 blocksize);
|
||||||
|
|
||||||
|
int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
|
||||||
|
u32 stripesize, struct btrfs_root *root,
|
||||||
|
struct btrfs_fs_info *fs_info, u64 objectid);
|
||||||
int clean_tree_block(struct btrfs_trans_handle *trans,
|
int clean_tree_block(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root, struct extent_buffer *buf);
|
struct btrfs_root *root, struct extent_buffer *buf);
|
||||||
struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes);
|
struct btrfs_root *open_ctree(const char *filename, u64 sb_bytenr, int writes);
|
||||||
|
26
find-root.c
26
find-root.c
@ -65,32 +65,6 @@ int csum_block(void *buf, u32 len)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
|
|
||||||
u32 stripesize, struct btrfs_root *root,
|
|
||||||
struct btrfs_fs_info *fs_info, u64 objectid)
|
|
||||||
{
|
|
||||||
root->node = NULL;
|
|
||||||
root->commit_root = NULL;
|
|
||||||
root->sectorsize = sectorsize;
|
|
||||||
root->nodesize = nodesize;
|
|
||||||
root->leafsize = leafsize;
|
|
||||||
root->stripesize = stripesize;
|
|
||||||
root->ref_cows = 0;
|
|
||||||
root->track_dirty = 0;
|
|
||||||
|
|
||||||
root->fs_info = fs_info;
|
|
||||||
root->objectid = objectid;
|
|
||||||
root->last_trans = 0;
|
|
||||||
root->highest_inode = 0;
|
|
||||||
root->last_inode_alloc = 0;
|
|
||||||
|
|
||||||
INIT_LIST_HEAD(&root->dirty_list);
|
|
||||||
memset(&root->root_key, 0, sizeof(root->root_key));
|
|
||||||
memset(&root->root_item, 0, sizeof(root->root_item));
|
|
||||||
root->root_key.objectid = objectid;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int close_all_devices(struct btrfs_fs_info *fs_info)
|
static int close_all_devices(struct btrfs_fs_info *fs_info)
|
||||||
{
|
{
|
||||||
struct list_head *list;
|
struct list_head *list;
|
||||||
|
Loading…
Reference in New Issue
Block a user