diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-02-27 21:46:09 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2014-03-10 15:17:07 -0400 |
commit | a44903abe9dc23ffa305898368a7a910dbae13c5 (patch) | |
tree | 926814c93112bf608fa3db44ed33e0eb4562bd7e /fs/btrfs/ordered-data.c | |
parent | a8c93d4ef6f6727764a61a2ee1c1878a755637c5 (diff) |
btrfs: Replace fs_info->flush_workers with btrfs_workqueue.
Replace the fs_info->submit_workers with the newly created
btrfs_workqueue.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Tested-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r-- | fs/btrfs/ordered-data.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index 138a7d7e9c90..6fa8219b5d03 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -576,7 +576,7 @@ void btrfs_remove_ordered_extent(struct inode *inode, | |||
576 | wake_up(&entry->wait); | 576 | wake_up(&entry->wait); |
577 | } | 577 | } |
578 | 578 | ||
579 | static void btrfs_run_ordered_extent_work(struct btrfs_work *work) | 579 | static void btrfs_run_ordered_extent_work(struct btrfs_work_struct *work) |
580 | { | 580 | { |
581 | struct btrfs_ordered_extent *ordered; | 581 | struct btrfs_ordered_extent *ordered; |
582 | 582 | ||
@@ -609,10 +609,11 @@ int btrfs_wait_ordered_extents(struct btrfs_root *root, int nr) | |||
609 | atomic_inc(&ordered->refs); | 609 | atomic_inc(&ordered->refs); |
610 | spin_unlock(&root->ordered_extent_lock); | 610 | spin_unlock(&root->ordered_extent_lock); |
611 | 611 | ||
612 | ordered->flush_work.func = btrfs_run_ordered_extent_work; | 612 | btrfs_init_work(&ordered->flush_work, |
613 | btrfs_run_ordered_extent_work, NULL, NULL); | ||
613 | list_add_tail(&ordered->work_list, &works); | 614 | list_add_tail(&ordered->work_list, &works); |
614 | btrfs_queue_worker(&root->fs_info->flush_workers, | 615 | btrfs_queue_work(root->fs_info->flush_workers, |
615 | &ordered->flush_work); | 616 | &ordered->flush_work); |
616 | 617 | ||
617 | cond_resched(); | 618 | cond_resched(); |
618 | spin_lock(&root->ordered_extent_lock); | 619 | spin_lock(&root->ordered_extent_lock); |
@@ -725,8 +726,8 @@ int btrfs_run_ordered_operations(struct btrfs_trans_handle *trans, | |||
725 | goto out; | 726 | goto out; |
726 | } | 727 | } |
727 | list_add_tail(&work->list, &works); | 728 | list_add_tail(&work->list, &works); |
728 | btrfs_queue_worker(&root->fs_info->flush_workers, | 729 | btrfs_queue_work(root->fs_info->flush_workers, |
729 | &work->work); | 730 | &work->work); |
730 | 731 | ||
731 | cond_resched(); | 732 | cond_resched(); |
732 | spin_lock(&root->fs_info->ordered_root_lock); | 733 | spin_lock(&root->fs_info->ordered_root_lock); |