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

« back to all changes in this revision

Viewing changes to fs/aufs/sysaufs.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-05-06 18:35:50 UTC
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20080506183550-7y7mrzkzkh2tjlfu
Tags: upstream-0+20080506
ImportĀ upstreamĀ versionĀ 0+20080506

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2007 Junjiro Okajima
 
2
 * Copyright (C) 2007-2008 Junjiro Okajima
3
3
 *
4
4
 * This program, aufs is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
19
19
/*
20
20
 * sysfs interface
21
21
 *
22
 
 * $Id: sysaufs.h,v 1.14 2008/03/31 07:43:33 sfjro Exp $
 
22
 * $Id: sysaufs.h,v 1.16 2008/04/13 23:45:29 sfjro Exp $
23
23
 */
24
24
 
25
25
#ifndef __SYSAUFS_H__
88
88
 
89
89
/* ---------------------------------------------------------------------- */
90
90
 
91
 
struct aufs_branch;
 
91
struct au_branch;
 
92
struct au_sbinfo;
92
93
#ifdef CONFIG_AUFS_SYSAUFS
 
94
extern struct mutex au_sbilist_mtx;
 
95
extern struct list_head au_sbilist;
 
96
 
 
97
static inline void au_sbilist_lock(void)
 
98
{
 
99
        mutex_lock(&au_sbilist_mtx);
 
100
}
 
101
 
 
102
static inline void au_sbilist_unlock(void)
 
103
{
 
104
        mutex_unlock(&au_sbilist_mtx);
 
105
}
 
106
 
 
107
static inline void au_sbilist_del(struct au_sbinfo *sbinfo)
 
108
{
 
109
        list_del(&sbinfo->si_list);
 
110
}
 
111
 
 
112
static inline void au_sbilist_add(struct au_sbinfo *sbinfo)
 
113
{
 
114
        /* the order in this list is important */
 
115
        list_add_tail(&sbinfo->si_list, &au_sbilist);
 
116
}
 
117
 
93
118
struct sysaufs_br *sysaufs_br_alloc(void);
94
 
void sysaufs_br_get(struct aufs_branch *br);
95
 
void sysaufs_br_put(struct aufs_branch *br);
 
119
void sysaufs_br_get(struct au_branch *br);
 
120
void sysaufs_br_put(struct au_branch *br);
96
121
void sysaufs_brs_add(struct super_block *sb);
97
122
void sysaufs_brs_del(struct super_block *sb);
98
 
struct sysaufs_sbinfo *sysaufs_sbinfo_alloc(void);
99
 
void sysaufs_sbinfo_get(struct super_block *sb);
100
 
void sysaufs_sbinfo_put(struct super_block *sb);
101
 
void sysaufs_sbinfo_add(struct super_block *sb);
102
 
void sysaufs_sbinfo_del(struct super_block *sb);
 
123
int sysaufs_sbi_init(struct au_sbinfo *sbinfo);
 
124
void sysaufs_sbi_get(struct super_block *sb);
 
125
void sysaufs_sbi_put(struct super_block *sb);
 
126
void sysaufs_sbi_add(struct super_block *sb);
 
127
void sysaufs_sbi_del(struct super_block *sb);
103
128
int __init sysaufs_init(void);
104
129
void sysaufs_fin(void);
105
130
 
106
131
#else
107
132
 
 
133
#define au_sbilist_lock()       do {} while (0)
 
134
#define au_sbilist_unlock()     do {} while (0)
 
135
 
 
136
static inline void au_sbilist_del(struct au_sbinfo *sbinfo)
 
137
{
 
138
        /* empty */
 
139
}
 
140
 
 
141
static inline void au_sbilist_add(struct au_sbinfo *sbinfo)
 
142
{
 
143
        /* empty */
 
144
}
 
145
 
108
146
static inline struct sysaufs_br *sysaufs_br_alloc(void)
109
147
{
110
148
        return (void *)-1; //todo: poison
111
149
}
112
150
 
113
 
static inline void sysaufs_br_get(struct aufs_branch *br)
 
151
static inline void sysaufs_br_get(struct au_branch *br)
114
152
{
115
153
        /* nothing */
116
154
}
117
155
 
118
 
static inline void sysaufs_br_put(struct aufs_branch *br)
 
156
static inline void sysaufs_br_put(struct au_branch *br)
119
157
{
120
158
        /* nothing */
121
159
}
130
168
        /* nothing */
131
169
}
132
170
 
133
 
static inline struct sysaufs_sbinfo *sysaufs_sbinfo_alloc(void)
134
 
{
135
 
        return (void *)-1; //todo: poison
136
 
}
137
 
 
138
 
static inline void sysaufs_sbinfo_get(struct super_block *sb)
139
 
{
140
 
        /* nothing */
141
 
}
142
 
 
143
 
static inline void sysaufs_sbinfo_put(struct super_block *sb)
144
 
{
145
 
        /* nothing */
146
 
}
147
 
 
148
 
static inline void sysaufs_sbinfo_add(struct super_block *sb)
149
 
{
150
 
        /* nothing */
151
 
}
152
 
 
153
 
static inline void sysaufs_sbinfo_del(struct super_block *sb)
154
 
{
155
 
        /* nothing */
156
 
}
157
 
 
158
 
#define sysaufs_init()                  0
 
171
static inline int sysaufs_sbi_init(struct au_sbinfo *sbinfo)
 
172
{
 
173
        return 0;
 
174
}
 
175
 
 
176
static inline void sysaufs_sbi_get(struct super_block *sb)
 
177
{
 
178
        /* nothing */
 
179
}
 
180
 
 
181
static inline void sysaufs_sbi_put(struct super_block *sb)
 
182
{
 
183
        /* nothing */
 
184
}
 
185
 
 
186
static inline void sysaufs_sbi_add(struct super_block *sb)
 
187
{
 
188
        /* nothing */
 
189
}
 
190
 
 
191
static inline void sysaufs_sbi_del(struct super_block *sb)
 
192
{
 
193
        /* nothing */
 
194
}
 
195
 
 
196
static inline int sysaufs_init(void)
 
197
{
 
198
        sysaufs_brs = 0;
 
199
        return 0;
 
200
}
 
201
 
159
202
#define sysaufs_fin()                   do {} while (0)
160
203
 
161
204
#endif /* CONFIG_AUFS_SYSAUFS */