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

« back to all changes in this revision

Viewing changes to fs/aufs/aufs.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2007-12-15 23:32:51 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071215233251-2vgs2lmg8mai5d9e
Tags: 0+20071211-1ubuntu1
* Merge from debian unstable (LP: #175705), remaining changes:
  - Fix for Ubuntu Kernels (updated)
* patches/01_vserver.dpatch: Removed
* patches/06_ubuntu.dpatch: Added (update of ubuntu patch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 */
18
18
 
19
 
/* $Id: aufs.h,v 1.26 2007/06/04 02:15:32 sfjro Exp $ */
 
19
/* $Id: aufs.h,v 1.40 2007/12/03 01:37:26 sfjro Exp $ */
20
20
 
21
21
#ifndef __AUFS_H__
22
22
#define __AUFS_H__
24
24
#ifdef __KERNEL__
25
25
 
26
26
#include <linux/version.h>
 
27
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
 
28
#include <linux/uaccess.h>
 
29
#else
 
30
#include <asm/uaccess.h>
 
31
#endif
 
32
 
 
33
/* ---------------------------------------------------------------------- */
27
34
 
28
35
/* limited support before 2.6.16, curretly 2.6.15 only. */
29
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
30
 
#define atomic_long_t           atomic_t
31
 
#define atomic_long_set         atomic_set
32
 
#define timespec_to_ns(ts)      ({(long long)(ts)->tv_sec;})
 
36
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
 
37
#define timespec_to_ns(ts)      ({ (long long)(ts)->tv_sec; })
33
38
#define D_CHILD                 d_child
34
39
#else
35
40
#define D_CHILD                 d_u.d_child
36
41
#endif
37
42
 
 
43
#include <linux/types.h>
 
44
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
 
45
typedef unsigned long blkcnt_t;
 
46
#endif
 
47
 
 
48
#include <linux/list.h>
 
49
#include <linux/sysfs.h>
 
50
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
 
51
typedef struct kset au_subsys_t;
 
52
#define au_subsys_to_kset(subsys) (subsys)
 
53
#else
 
54
typedef struct subsystem au_subsys_t;
 
55
#define au_subsys_to_kset(subsys) ((subsys).kset)
 
56
#endif
 
57
 
 
58
#include <linux/gfp.h>
 
59
#ifndef GFP_TEMPORARY
 
60
#define GFP_TEMPORARY GFP_KERNEL
 
61
#endif
 
62
 
 
63
#include <linux/fs.h>
 
64
#ifndef FMODE_EXEC
 
65
/* introduced linux-2.6.17 */
 
66
#define FMODE_EXEC 0
 
67
#endif
 
68
 
 
69
#include <linux/compiler.h>
 
70
#ifndef __packed
 
71
#define __packed        __attribute__((packed))
 
72
#endif
 
73
#ifndef __aligned
 
74
#define __aligned(x)    __attribute__((aligned(x)))
 
75
#endif
 
76
 
 
77
/* ---------------------------------------------------------------------- */
 
78
 
 
79
#define _AuNoNfsBranchMsg "NFS branch is not supported"
 
80
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
 
81
#define AuNoNfsBranch
 
82
#define AuNoNfsBranchMsg _AuNoNfsBranchMsg
 
83
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) \
 
84
        && (!defined(CONFIG_AUFS_LHASH_PATCH) \
 
85
            || !(defined(CONFIG_AUFS) \
 
86
                 || defined(CONFIG_AUFS_PUT_FILP_PATCH)) \
 
87
            || defined(CONFIG_AUFS_FAKE_DM))
 
88
#define AuNoNfsBranch
 
89
#define AuNoNfsBranchMsg _AuNoNfsBranchMsg \
 
90
        ", try some configurations and patches included in aufs source CVS"
 
91
#endif
 
92
 
38
93
/* ---------------------------------------------------------------------- */
39
94
 
40
95
#include "debug.h"
45
100
#include "dentry.h"
46
101
#include "dir.h"
47
102
#include "file.h"
 
103
#include "hinode.h"
48
104
#include "inode.h"
49
105
#include "misc.h"
50
106
#include "module.h"
56
112
#include "wkq.h"
57
113
//#include "xattr.h"
58
114
 
59
 
#define AuUse_ISSUBDIR
 
115
/* ---------------------------------------------------------------------- */
 
116
 
60
117
#ifdef CONFIG_AUFS_MODULE
61
118
 
62
119
/* call ksize() or not */
63
 
#ifndef CONFIG_AUFS_KSIZE_PATCH
 
120
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) \
 
121
        && !defined(CONFIG_AUFS_KSIZE_PATCH)
64
122
#define ksize(p)        (0U)
65
123
#endif
66
124
 
67
 
/* call is_subdir() or not */
68
 
#ifndef CONFIG_AUFS_ISSUBDIR_PATCH
69
 
#undef AuUse_ISSUBDIR
70
 
#endif
71
 
 
72
125
#endif /* CONFIG_AUFS_MODULE */
73
126
 
74
127
#endif /* __KERNEL__ */