diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-11-04 16:13:25 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-12 04:13:44 +0100 |
commit | b02441999efcc6152b87cd58e7970bb7843f76cf (patch) | |
tree | 36f8e823f3ee84528f3f030323b472a72a915094 /fs/btrfs/dev-replace.c | |
parent | Btrfs: don't wait for all the async delalloc when shrinking delalloc (diff) | |
download | linux-b02441999efcc6152b87cd58e7970bb7843f76cf.tar.xz linux-b02441999efcc6152b87cd58e7970bb7843f76cf.zip |
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/dev-replace.c')
-rw-r--r-- | fs/btrfs/dev-replace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index cb94310db072..3d2495e83e62 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -391,7 +391,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root, args->result = BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR; btrfs_dev_replace_unlock(dev_replace); - btrfs_wait_all_ordered_extents(root->fs_info); + btrfs_wait_ordered_roots(root->fs_info, -1); /* force writing the updated state information to disk */ trans = btrfs_start_transaction(root, 0); @@ -466,7 +466,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); return ret; } - btrfs_wait_all_ordered_extents(root->fs_info); + btrfs_wait_ordered_roots(root->fs_info, -1); trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { |