forked from luck/tmp_suning_uos_patched
btrfs: move tree block wait and write helpers to tree-log
The wrapper names better describe what's happening so they're not deleted though they're trivial, but at least moved closer to their place of use. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d4eb671a08
commit
247462a5ac
|
@ -1078,19 +1078,6 @@ struct extent_buffer *btrfs_find_create_tree_block(
|
|||
return alloc_extent_buffer(fs_info, bytenr);
|
||||
}
|
||||
|
||||
|
||||
int btrfs_write_tree_block(struct extent_buffer *buf)
|
||||
{
|
||||
return filemap_fdatawrite_range(buf->pages[0]->mapping, buf->start,
|
||||
buf->start + buf->len - 1);
|
||||
}
|
||||
|
||||
void btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
|
||||
{
|
||||
filemap_fdatawait_range(buf->pages[0]->mapping,
|
||||
buf->start, buf->start + buf->len - 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Read tree block at logical address @bytenr and do variant basic but critical
|
||||
* verification.
|
||||
|
|
|
@ -126,8 +126,6 @@ blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
|
|||
extent_submit_bio_start_t *submit_bio_start);
|
||||
blk_status_t btrfs_submit_bio_done(void *private_data, struct bio *bio,
|
||||
int mirror_num);
|
||||
int btrfs_write_tree_block(struct extent_buffer *buf);
|
||||
void btrfs_wait_tree_block_writeback(struct extent_buffer *buf);
|
||||
int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_fs_info *fs_info);
|
||||
int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
|
||||
|
|
|
@ -225,6 +225,17 @@ void btrfs_end_log_trans(struct btrfs_root *root)
|
|||
}
|
||||
}
|
||||
|
||||
static int btrfs_write_tree_block(struct extent_buffer *buf)
|
||||
{
|
||||
return filemap_fdatawrite_range(buf->pages[0]->mapping, buf->start,
|
||||
buf->start + buf->len - 1);
|
||||
}
|
||||
|
||||
static void btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
|
||||
{
|
||||
filemap_fdatawait_range(buf->pages[0]->mapping,
|
||||
buf->start, buf->start + buf->len - 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* the walk control struct is used to pass state down the chain when
|
||||
|
|
Loading…
Reference in New Issue
Block a user