mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 09:40:27 +02:00
btrfs: remove write and wait of struct walk_control
The ->write and ->wait fields of struct walk_control, used for log trees, are not used since 2008, more specifically since commitd0c803c404("Btrfs: Record dirty pages tree-log pages in an extent_io tree") and since commitd0c803c404("Btrfs: Record dirty pages tree-log pages in an extent_io tree"). So just remove them, along with the function btrfs_write_tree_block(), which is also not used anymore after removing the ->write member. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
09688c0166
commit
c816d705b9
1 changed files with 5 additions and 23 deletions
|
|
@ -270,12 +270,6 @@ 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)
|
static void btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
|
||||||
{
|
{
|
||||||
filemap_fdatawait_range(buf->pages[0]->mapping,
|
filemap_fdatawait_range(buf->pages[0]->mapping,
|
||||||
|
|
@ -294,16 +288,6 @@ struct walk_control {
|
||||||
*/
|
*/
|
||||||
int free;
|
int free;
|
||||||
|
|
||||||
/* should we write out the extent buffer? This is used
|
|
||||||
* while flushing the log tree to disk during a sync
|
|
||||||
*/
|
|
||||||
int write;
|
|
||||||
|
|
||||||
/* should we wait for the extent buffer io to finish? Also used
|
|
||||||
* while flushing the log tree to disk for a sync
|
|
||||||
*/
|
|
||||||
int wait;
|
|
||||||
|
|
||||||
/* pin only walk, we record which extents on disk belong to the
|
/* pin only walk, we record which extents on disk belong to the
|
||||||
* log trees
|
* log trees
|
||||||
*/
|
*/
|
||||||
|
|
@ -354,17 +338,15 @@ static int process_one_buffer(struct btrfs_root *log,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wc->pin)
|
if (wc->pin) {
|
||||||
ret = btrfs_pin_extent_for_log_replay(wc->trans, eb->start,
|
ret = btrfs_pin_extent_for_log_replay(wc->trans, eb->start,
|
||||||
eb->len);
|
eb->len);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (!ret && btrfs_buffer_uptodate(eb, gen, 0)) {
|
if (btrfs_buffer_uptodate(eb, gen, 0) &&
|
||||||
if (wc->pin && btrfs_header_level(eb) == 0)
|
btrfs_header_level(eb) == 0)
|
||||||
ret = btrfs_exclude_logged_extents(eb);
|
ret = btrfs_exclude_logged_extents(eb);
|
||||||
if (wc->write)
|
|
||||||
btrfs_write_tree_block(eb);
|
|
||||||
if (wc->wait)
|
|
||||||
btrfs_wait_tree_block_writeback(eb);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue