diff options
author | Filipe Manana <fdmanana@suse.com> | 2016-04-26 16:36:38 +0200 |
---|---|---|
committer | Filipe Manana <fdmanana@suse.com> | 2016-05-13 02:59:14 +0200 |
commit | 578def7c50f236432ba140d35bb7ca4ef0a1b20b (patch) | |
tree | c6b2e052c0ba5b95d1659f0e95651445951426e1 /fs/btrfs/transaction.c | |
parent | Btrfs: fix empty symlink after creating symlink and fsync parent dir (diff) | |
download | linux-578def7c50f236432ba140d35bb7ca4ef0a1b20b.tar.xz linux-578def7c50f236432ba140d35bb7ca4ef0a1b20b.zip |
Btrfs: don't wait for unrelated IO to finish before relocation
Before the relocation process of a block group starts, it sets the block
group to readonly mode, then flushes all delalloc writes and then finally
it waits for all ordered extents to complete. This last step includes
waiting for ordered extents destinated at extents allocated in other block
groups, making us waste unecessary time.
So improve this by waiting only for ordered extents that fall into the
block group's range.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 43885e51b882..f0bb54a77314 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1821,7 +1821,7 @@ static inline int btrfs_start_delalloc_flush(struct btrfs_fs_info *fs_info) static inline void btrfs_wait_delalloc_flush(struct btrfs_fs_info *fs_info) { if (btrfs_test_opt(fs_info->tree_root, FLUSHONCOMMIT)) - btrfs_wait_ordered_roots(fs_info, -1); + btrfs_wait_ordered_roots(fs_info, -1, 0, (u64)-1); } static inline void |