aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/async-thread.h')
-rw-r--r--fs/btrfs/async-thread.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/btrfs/async-thread.h b/fs/btrfs/async-thread.h
index 1f26792683ed..9d8da53f6dd9 100644
--- a/fs/btrfs/async-thread.h
+++ b/fs/btrfs/async-thread.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2007 Oracle. All rights reserved. 2 * Copyright (C) 2007 Oracle. All rights reserved.
3 * Copyright (C) 2014 Fujitsu. All rights reserved.
3 * 4 *
4 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public 6 * modify it under the terms of the GNU General Public
@@ -118,4 +119,30 @@ void btrfs_init_workers(struct btrfs_workers *workers, char *name, int max,
118 struct btrfs_workers *async_starter); 119 struct btrfs_workers *async_starter);
119void btrfs_requeue_work(struct btrfs_work *work); 120void btrfs_requeue_work(struct btrfs_work *work);
120void btrfs_set_work_high_prio(struct btrfs_work *work); 121void btrfs_set_work_high_prio(struct btrfs_work *work);
122
123struct btrfs_workqueue_struct;
124
125struct btrfs_work_struct {
126 void (*func)(struct btrfs_work_struct *arg);
127 void (*ordered_func)(struct btrfs_work_struct *arg);
128 void (*ordered_free)(struct btrfs_work_struct *arg);
129
130 /* Don't touch things below */
131 struct work_struct normal_work;
132 struct list_head ordered_list;
133 struct btrfs_workqueue_struct *wq;
134 unsigned long flags;
135};
136
137struct btrfs_workqueue_struct *btrfs_alloc_workqueue(char *name,
138 int flags,
139 int max_active);
140void btrfs_init_work(struct btrfs_work_struct *work,
141 void (*func)(struct btrfs_work_struct *),
142 void (*ordered_func)(struct btrfs_work_struct *),
143 void (*ordered_free)(struct btrfs_work_struct *));
144void btrfs_queue_work(struct btrfs_workqueue_struct *wq,
145 struct btrfs_work_struct *work);
146void btrfs_destroy_workqueue(struct btrfs_workqueue_struct *wq);
147void btrfs_workqueue_set_max(struct btrfs_workqueue_struct *wq, int max);
121#endif 148#endif