diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-02-28 06:46:04 +0400 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2014-03-10 23:17:03 +0400 |
commit | 1ca08976ae94f3594dd7303584581cf8099ce47e (patch) | |
tree | 36266c4bd75ea9807f8936c40d1e13803b3fd83a /fs/btrfs/async-thread.h | |
parent | 08a9ff3264181986d1d692a4e6fce3669700c9f8 (diff) | |
download | linux-1ca08976ae94f3594dd7303584581cf8099ce47e.tar.xz |
btrfs: Add high priority workqueue support for btrfs_workqueue_struct
Add high priority function to btrfs_workqueue.
This is implemented by embedding a btrfs_workqueue into a
btrfs_workqueue and use some helper functions to differ the normal
priority wq and high priority wq.
So the high priority wq is completely independent from the normal
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/async-thread.h')
-rw-r--r-- | fs/btrfs/async-thread.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.h b/fs/btrfs/async-thread.h index 9d8da53f6dd9..fce623cfe3da 100644 --- a/fs/btrfs/async-thread.h +++ b/fs/btrfs/async-thread.h @@ -121,6 +121,8 @@ void btrfs_requeue_work(struct btrfs_work *work); void btrfs_set_work_high_prio(struct btrfs_work *work); struct btrfs_workqueue_struct; +/* Internal use only */ +struct __btrfs_workqueue_struct; struct btrfs_work_struct { void (*func)(struct btrfs_work_struct *arg); @@ -130,7 +132,7 @@ struct btrfs_work_struct { /* Don't touch things below */ struct work_struct normal_work; struct list_head ordered_list; - struct btrfs_workqueue_struct *wq; + struct __btrfs_workqueue_struct *wq; unsigned long flags; }; @@ -145,4 +147,5 @@ void btrfs_queue_work(struct btrfs_workqueue_struct *wq, struct btrfs_work_struct *work); void btrfs_destroy_workqueue(struct btrfs_workqueue_struct *wq); void btrfs_workqueue_set_max(struct btrfs_workqueue_struct *wq, int max); +void btrfs_set_work_high_priority(struct btrfs_work_struct *work); #endif |