On Tue, Nov 06, 2007 at 02:33:53AM -0800, akpm@linux-foundation.org wrote:
[mmotm.git] / fs / reiser4 / ktxnmgrd.h
blobd00f1d9e54ed0028cd181c784a9ae086c3ea7a7f
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by
2 * reiser4/README */
4 /* Transaction manager daemon. See ktxnmgrd.c for comments. */
6 #ifndef __KTXNMGRD_H__
7 #define __KTXNMGRD_H__
9 #include "txnmgr.h"
11 #include <linux/fs.h>
12 #include <linux/wait.h>
13 #include <linux/completion.h>
14 #include <linux/spinlock.h>
15 #include <asm/atomic.h>
16 #include <linux/sched.h> /* for struct task_struct */
18 /* in this structure all data necessary to start up, shut down and communicate
19 * with ktxnmgrd are kept. */
20 struct ktxnmgrd_context {
21 /* wait queue head on which ktxnmgrd sleeps */
22 wait_queue_head_t wait;
23 /* spin lock protecting all fields of this structure */
24 spinlock_t guard;
25 /* timeout of sleeping on ->wait */
26 signed long timeout;
27 /* kernel thread running ktxnmgrd */
28 struct task_struct *tsk;
29 /* list of all file systems served by this ktxnmgrd */
30 struct list_head queue;
31 /* should ktxnmgrd repeat scanning of atoms? */
32 unsigned int rescan:1;
35 extern int reiser4_init_ktxnmgrd(struct super_block *);
36 extern void reiser4_done_ktxnmgrd(struct super_block *);
38 extern void ktxnmgrd_kick(txn_mgr * mgr);
39 extern int is_current_ktxnmgrd(void);
41 /* __KTXNMGRD_H__ */
42 #endif
44 /* Make Linus happy.
45 Local variables:
46 c-indentation-style: "K&R"
47 mode-name: "LC"
48 c-basic-offset: 8
49 tab-width: 8
50 fill-column: 120
51 End: