summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-03-21 15:21:05 -0400
committerDavid Sterba <dsterba@suse.com>2019-04-29 13:02:28 -0400
commit247462a5aca5154c8542830e3ec4d1fce2733433 (patch)
treee13bfd7a74a14b8a84c44d895b393d8e5b69f4e4 /fs/btrfs/tree-log.c
parentd4eb671a0882ee58774e201b1ada3d19b99394b9 (diff)
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>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 561884f60d35..a59e98c9fbb9 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -225,6 +225,17 @@ void btrfs_end_log_trans(struct btrfs_root *root)
225 } 225 }
226} 226}
227 227
228static int btrfs_write_tree_block(struct extent_buffer *buf)
229{
230 return filemap_fdatawrite_range(buf->pages[0]->mapping, buf->start,
231 buf->start + buf->len - 1);
232}
233
234static void btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
235{
236 filemap_fdatawait_range(buf->pages[0]->mapping,
237 buf->start, buf->start + buf->len - 1);
238}
228 239
229/* 240/*
230 * the walk control struct is used to pass state down the chain when 241 * the walk control struct is used to pass state down the chain when