aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-11-04 10:13:25 -0500
committerChris Mason <chris.mason@fusionio.com>2013-11-11 22:13:44 -0500
commitb02441999efcc6152b87cd58e7970bb7843f76cf (patch)
tree36f8e823f3ee84528f3f030323b472a72a915094 /fs/btrfs/transaction.c
parent9f3a074d108810139ad4af49a29d347a4cf41e9a (diff)
Btrfs: don't wait for the completion of all the ordered extents
It is very likely that there are lots of ordered extents in the filesytem, if we wait for the completion of all of them when we want to reclaim some space for the metadata space reservation, we would be blocked for a long time. The performance would drop down suddenly for a long time. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 277fe812d047..32c100b8c563 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1636,7 +1636,7 @@ static inline int btrfs_start_delalloc_flush(struct btrfs_fs_info *fs_info)
1636static inline void btrfs_wait_delalloc_flush(struct btrfs_fs_info *fs_info) 1636static inline void btrfs_wait_delalloc_flush(struct btrfs_fs_info *fs_info)
1637{ 1637{
1638 if (btrfs_test_opt(fs_info->tree_root, FLUSHONCOMMIT)) 1638 if (btrfs_test_opt(fs_info->tree_root, FLUSHONCOMMIT))
1639 btrfs_wait_all_ordered_extents(fs_info); 1639 btrfs_wait_ordered_roots(fs_info, -1);
1640} 1640}
1641 1641
1642int btrfs_commit_transaction(struct btrfs_trans_handle *trans, 1642int btrfs_commit_transaction(struct btrfs_trans_handle *trans,