summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.h
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2014-03-06 05:19:50 +0100
committerJosef Bacik <jbacik@fb.com>2014-03-10 20:17:20 +0100
commit6db8914f9763d3f0a7610b497d44f93a4c17e62e (patch)
treebf266c5830b629ca7a85b7fd1cefbbde57afdc35 /fs/btrfs/async-thread.h
parentBtrfs: add readahead for send_write (diff)
downloadlinux-6db8914f9763d3f0a7610b497d44f93a4c17e62e.tar.xz
linux-6db8914f9763d3f0a7610b497d44f93a4c17e62e.zip
btrfs: Cleanup the btrfs_workqueue related function type
The new btrfs_workqueue still use open-coded function defition, this patch will change them into btrfs_func_t type which is much the same as kernel workqueue. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/async-thread.h')
-rw-r--r--fs/btrfs/async-thread.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/btrfs/async-thread.h b/fs/btrfs/async-thread.h
index 08d717476227..0a891cdc4c28 100644
--- a/fs/btrfs/async-thread.h
+++ b/fs/btrfs/async-thread.h
@@ -23,11 +23,13 @@
struct btrfs_workqueue;
/* Internal use only */
struct __btrfs_workqueue;
+struct btrfs_work;
+typedef void (*btrfs_func_t)(struct btrfs_work *arg);
struct btrfs_work {
- void (*func)(struct btrfs_work *arg);
- void (*ordered_func)(struct btrfs_work *arg);
- void (*ordered_free)(struct btrfs_work *arg);
+ btrfs_func_t func;
+ btrfs_func_t ordered_func;
+ btrfs_func_t ordered_free;
/* Don't touch things below */
struct work_struct normal_work;
@@ -37,13 +39,13 @@ struct btrfs_work {
};
struct btrfs_workqueue *btrfs_alloc_workqueue(char *name,
- int flags,
- int max_active,
- int thresh);
+ int flags,
+ int max_active,
+ int thresh);
void btrfs_init_work(struct btrfs_work *work,
- void (*func)(struct btrfs_work *),
- void (*ordered_func)(struct btrfs_work *),
- void (*ordered_free)(struct btrfs_work *));
+ btrfs_func_t func,
+ btrfs_func_t ordered_func,
+ btrfs_func_t ordered_free);
void btrfs_queue_work(struct btrfs_workqueue *wq,
struct btrfs_work *work);
void btrfs_destroy_workqueue(struct btrfs_workqueue *wq);