~ubuntu-branches/ubuntu/vivid/aufs/vivid

« back to all changes in this revision

Viewing changes to fs/aufs25/module.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:
 
1
/*
 
2
 * Copyright (C) 2007-2008 Junjiro Okajima
 
3
 *
 
4
 * This program, aufs is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 */
 
18
 
 
19
/*
 
20
 * module initialization and module-global
 
21
 *
 
22
 * $Id: module.h,v 1.2 2008/04/21 01:33:00 sfjro Exp $
 
23
 */
 
24
 
 
25
#ifndef __AUFS_MODULE_H__
 
26
#define __AUFS_MODULE_H__
 
27
 
 
28
#ifdef __KERNEL__
 
29
 
 
30
//#include <linux/slab.h>
 
31
 
 
32
/* ---------------------------------------------------------------------- */
 
33
 
 
34
/* module parameters */
 
35
extern short aufs_nwkq;
 
36
extern int sysaufs_brs;
 
37
 
 
38
/* ---------------------------------------------------------------------- */
 
39
 
 
40
extern char au_esc_chars[];
 
41
extern int au_dir_roflags;
 
42
 
 
43
/* kmem cache */
 
44
enum {
 
45
        AuCache_DINFO,
 
46
        AuCache_ICNTNR,
 
47
        AuCache_FINFO,
 
48
        AuCache_VDIR,
 
49
        AuCache_DEHSTR,
 
50
#ifdef CONFIG_AUFS_HINOTIFY
 
51
        AuCache_HINOTIFY,
 
52
#endif
 
53
        AuCache_Last
 
54
};
 
55
 
 
56
extern struct kmem_cache *au_cachep[];
 
57
 
 
58
#define AuCacheArgs(type, sz)   (type), (sz), 0, SLAB_RECLAIM_ACCOUNT, NULL
 
59
#define AuCacheX(type, extra) \
 
60
        kmem_cache_create(AuCacheArgs(#type, sizeof(struct type) + extra))
 
61
#define AuCache(type)           AuCacheX(type, 0)
 
62
 
 
63
/* ---------------------------------------------------------------------- */
 
64
 
 
65
#define AuCacheFuncs(name, index) \
 
66
static inline void *au_cache_alloc_##name(void) \
 
67
{ return kmem_cache_alloc(au_cachep[index], GFP_KERNEL); } \
 
68
static inline void au_cache_free_##name(void *p) \
 
69
{ kmem_cache_free(au_cachep[index], p); }
 
70
 
 
71
AuCacheFuncs(dinfo, AuCache_DINFO);
 
72
AuCacheFuncs(icntnr, AuCache_ICNTNR);
 
73
AuCacheFuncs(finfo, AuCache_FINFO);
 
74
AuCacheFuncs(vdir, AuCache_VDIR);
 
75
AuCacheFuncs(dehstr, AuCache_DEHSTR);
 
76
 
 
77
#endif /* __KERNEL__ */
 
78
#endif /* __AUFS_MODULE_H__ */