~ubuntu-branches/ubuntu/quantal/aufs/quantal

« back to all changes in this revision

Viewing changes to fs/aufs/inode.h

  • Committer: Bazaar Package Importer
  • Author(s): Julian Andres Klode
  • Date: 2008-04-01 18:26:37 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080401182637-ujuqq47eiggw4y5w
Tags: 0+20080401-1
* New upstream snapshot
  - Remove bashisms in script (Closes: #471288)
* debian/conf.mk, linux-patch-aufs.kpatches.sysfs_get_dentry:
  - Remove support for this patch, no longer used
* debian/conf.mk:
  - Add hacks for arm to armel (Closes: #473767)
* debian/control:
  - Add Dm-Upload-Allowed
* debian/copyright:
  - Use http://wiki.debian.org/Proposals/CopyrightFormat
* debian/linux-patch-aufs.kpatches.{splice,put_filp}:
  - Add support for Kernel 2.6.24 (and 2.6.25)
* debian/patches:
  - 01_vserver_apparmor: Update patch
  - 06_rt: Add patch for realtime kernel
  - 07_splice_hack: Add hack to support splice operations (Closes: #473430)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2005, 2006, 2007 Junjiro Okajima
 
2
 * Copyright (C) 2005-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
16
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 */
18
18
 
19
 
/* $Id: inode.h,v 1.47 2007/11/12 01:40:34 sfjro Exp $ */
 
19
/*
 
20
 * inode operations
 
21
 *
 
22
 * $Id: inode.h,v 1.51 2008/03/31 07:45:32 sfjro Exp $
 
23
 */
20
24
 
21
25
#ifndef __AUFS_INODE_H__
22
26
#define __AUFS_INODE_H__
24
28
#ifdef __KERNEL__
25
29
 
26
30
#include <linux/fs.h>
27
 
#include <linux/version.h>
 
31
#include <linux/namei.h>
28
32
#include <linux/aufs_type.h>
29
33
#include "misc.h"
30
34
 
54
58
 
55
59
/* i_op.c */
56
60
extern struct inode_operations aufs_iop, aufs_symlink_iop, aufs_dir_iop;
 
61
 
 
62
/* au_wr_dir flags */
 
63
#define AuWrDir_ADD_ENTRY       1
 
64
#define AuWrDir_LOCK_SRCDIR     (1 << 1)
 
65
#define AuWrDir_ISDIR           (1 << 2)
 
66
#define au_ftest_wrdir(flags, name)     ((flags) & AuWrDir_##name)
 
67
#define au_fset_wrdir(flags, name)      { (flags) |= AuWrDir_##name; }
 
68
#define au_fclr_wrdir(flags, name)      { (flags) &= ~AuWrDir_##name; }
 
69
 
57
70
struct au_wr_dir_args {
58
71
        aufs_bindex_t force_btgt;
59
 
 
60
 
        unsigned int add_entry:1;
61
 
        unsigned int do_lock_srcdir:1;
62
 
        unsigned int isdir:1;
 
72
        unsigned int flags;
63
73
};
64
74
int au_wr_dir(struct dentry *dentry, struct dentry *src_dentry,
65
75
              struct au_wr_dir_args *args);
66
76
 
67
77
/* i_op_add.c */
 
78
struct aufs_ndx;
 
79
int au_may_add(struct dentry *dentry, aufs_bindex_t bindex,
 
80
               struct dentry *h_parent, int isdir, struct aufs_ndx *ndx);
68
81
int aufs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev);
69
82
int aufs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
70
83
int aufs_create(struct inode *dir, struct dentry *dentry, int mode,
76
89
/* i_op_del.c */
77
90
int au_wr_dir_need_wh(struct dentry *dentry, int isdir, aufs_bindex_t *bcpup,
78
91
                      struct dentry *locked);
 
92
int au_may_del(struct dentry *dentry, aufs_bindex_t bindex,
 
93
               struct dentry *h_parent, int isdir, struct aufs_ndx *ndx);
79
94
int aufs_unlink(struct inode *dir, struct dentry *dentry);
80
95
int aufs_rmdir(struct inode *dir, struct dentry *dentry);
81
96
 
109
124
void set_ivdir(struct inode *inode, struct aufs_vdir *vdir);
110
125
void set_hi_wh(struct inode *inode, aufs_bindex_t bindex, struct dentry *h_wh);
111
126
void aufs_hiput(struct aufs_hinode *hinode);
112
 
#define AUFS_HI_XINO    1
113
 
#define AUFS_HI_NOTIFY  2
114
127
unsigned int au_hi_flags(struct inode *inode, int isdir);
115
128
struct aufs_hinode *itohi(struct inode *inode, aufs_bindex_t bindex);
 
129
 
 
130
/* hinode flags */
 
131
#define AuHi_XINO       1
 
132
#define AuHi_NOTIFY     (1 << 1)
 
133
#define au_ftest_hi(flags, name)        ((flags) & AuHi_##name)
 
134
#define au_fset_hi(flags, name)         { (flags) |= AuHi_##name; }
 
135
#define au_fclr_hi(flags, name)         { (flags) &= ~AuHi_##name; }
 
136
 
116
137
void set_h_iptr(struct inode *inode, aufs_bindex_t bindex,
117
138
                struct inode *h_inode, unsigned int flags);
 
139
 
118
140
void au_update_iigen(struct inode *inode);
119
141
void au_update_brange(struct inode *inode, int do_put_zero);
120
142
 
154
176
        return atomic_read(&itoii(inode)->ii_generation);
155
177
}
156
178
 
157
 
static inline au_gen_t au_iigen_inc(struct inode *inode)
158
 
{
159
 
        //AuDbg("i%lu\n", inode->i_ino);
160
 
        return atomic_inc_return(&itoii(inode)->ii_generation);
161
 
}
162
 
 
 
179
#ifdef CONFIG_AUFS_HINOTIFY
163
180
static inline au_gen_t au_iigen_dec(struct inode *inode)
164
181
{
165
182
        //AuDbg("i%lu\n", inode->i_ino);
166
183
        return atomic_dec_return(&itoii(inode)->ii_generation);
167
184
}
 
185
#endif
168
186
 
169
187
/* ---------------------------------------------------------------------- */
170
188