~ubuntu-branches/ubuntu/raring/aufs/raring

« back to all changes in this revision

Viewing changes to fs/aufs/wkq.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-05-06 18:35:50 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080506183550-0b6c974kkgc46oeh
Tags: 0+20080506-1
* New upstream release, supports Kernel 2.6.25 (Closes: #479717)
* Fix building with older Kernels (Closes: #475042)
* Update the patches 01, 04 and 07 to also patch fs/aufs25

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 */
18
18
 
19
19
/*
20
 
 * workqueue for asynchronous operations
 
20
 * workqueue for asynchronous/super-io/delegated operations
21
21
 *
22
 
 * $Id: wkq.h,v 1.20 2008/03/31 07:45:33 sfjro Exp $
 
22
 * $Id: wkq.h,v 1.21 2008/04/13 23:48:55 sfjro Exp $
23
23
 */
24
24
 
25
25
#ifndef __AUFS_WKQ_H__
48
48
 
49
49
/* internal workqueue named AUFS_WKQ_NAME */
50
50
struct au_wkq {
51
 
        struct workqueue_struct *q;
 
51
        struct workqueue_struct *q;
52
52
 
53
53
        /* accounting */
54
 
        atomic_t busy;
55
 
        unsigned int max_busy;
 
54
        atomic_t                busy;
 
55
        unsigned int            max_busy;
56
56
};
57
57
 
58
58
/*
61
61
struct au_nowait_tasks {
62
62
#ifdef CONFIG_AUFS_HINOTIFY
63
63
        /*
64
 
         * currently, the 'nowait' task which should be waited for in the next
 
64
         * currently, the 'nowait' task which should be waited in the next
65
65
         * operation is only hinotify.
66
66
         */
67
67
        atomic_t                nw_len;
80
80
#define au_ftest_wkq(flags, name)       ((flags) & AuWkq_##name)
81
81
#define au_fset_wkq(flags, name)        { (flags) |= AuWkq_##name; }
82
82
#define au_fclr_wkq(flags, name)        { (flags) &= ~AuWkq_##name; }
 
83
#ifndef CONFIG_AUFS_DLGT
 
84
#undef AuWkq_DLGT
 
85
#define AuWkq_DLGT      0
 
86
#endif
83
87
 
84
88
int au_wkq_run(au_wkq_func_t func, void *args, struct super_block *sb,
85
89
               unsigned int flags);
90
94
 
91
95
static inline int au_test_wkq(struct task_struct *tsk)
92
96
{
93
 
        return (!tsk->mm && !strcmp(current->comm, AUFS_WKQ_NAME));
94
 
#if 0 // multithread workqueue
 
97
        return (!tsk->mm && !strcmp(tsk->comm, AUFS_WKQ_NAME));
 
98
#if 0 // per-cpu workqueue
95
99
        return (!tsk->mm
96
 
                && !memcmp(current->comm, AUFS_WKQ_NAME "/",
 
100
                && !memcmp(tsk->comm, AUFS_WKQ_NAME "/",
97
101
                           sizeof(AUFS_WKQ_NAME)));
98
102
#endif
99
103
}