aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-10-25 05:28:04 -0400
committerJosef Bacik <jbacik@fusionio.com>2012-12-11 13:31:37 -0500
commit8ccf6f19b67f7e0921063cc309f4672a6afcb528 (patch)
tree98cd76ca5dd2e7c93adc1bd363fefaa803acc824 /fs/btrfs/relocation.c
parent7b398f8e58c415738e397645c926253c428cf002 (diff)
Btrfs: make delalloc inodes be flushed by multi-task
This patch introduce a new worker pool named "flush_workers", and if we want to force all the inode with pending delalloc to the disks, we can queue those inodes into the work queue of the worker pool, in this way, those inodes will be flushed by multi-task. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 242d6de4d8eb..270f24ffe1be 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -4061,7 +4061,11 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
4061 (unsigned long long)rc->block_group->key.objectid, 4061 (unsigned long long)rc->block_group->key.objectid,
4062 (unsigned long long)rc->block_group->flags); 4062 (unsigned long long)rc->block_group->flags);
4063 4063
4064 btrfs_start_delalloc_inodes(fs_info->tree_root, 0); 4064 ret = btrfs_start_delalloc_inodes(fs_info->tree_root, 0);
4065 if (ret < 0) {
4066 err = ret;
4067 goto out;
4068 }
4065 btrfs_wait_ordered_extents(fs_info->tree_root, 0); 4069 btrfs_wait_ordered_extents(fs_info->tree_root, 0);
4066 4070
4067 while (1) { 4071 while (1) {