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

« back to all changes in this revision

Viewing changes to fs/aufs/dir.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:
19
19
/*
20
20
 * directory operations
21
21
 *
22
 
 * $Id: dir.h,v 1.26 2008/03/31 07:45:32 sfjro Exp $
 
22
 * $Id: dir.h,v 1.27 2008/04/13 23:40:09 sfjro Exp $
23
23
 */
24
24
 
25
25
#ifndef __AUFS_DIR_H__
47
47
#error invalid size AuSize_DEBLK
48
48
#endif
49
49
 
50
 
typedef char aufs_deblk_t[AuSize_DEBLK];
 
50
typedef char au_vdir_deblk_t[AuSize_DEBLK];
51
51
 
52
 
struct aufs_nhash {
 
52
struct au_nhash {
53
53
        struct hlist_head heads[AuSize_NHASH];
54
54
};
55
55
 
56
 
struct aufs_destr {
 
56
struct au_vdir_destr {
57
57
        unsigned char   len;
58
58
        char            name[0];
59
59
} __packed;
60
60
 
61
 
struct aufs_dehstr {
62
 
        struct hlist_node hash;
63
 
        struct aufs_destr *str;
 
61
struct au_vdir_dehstr {
 
62
        struct hlist_node       hash;
 
63
        struct au_vdir_destr    *str;
64
64
};
65
65
 
66
 
struct aufs_de {
 
66
struct au_vdir_de {
67
67
        ino_t                   de_ino;
68
68
        unsigned char           de_type;
69
69
        /* caution: packed */
70
 
        struct aufs_destr       de_str;
 
70
        struct au_vdir_destr    de_str;
71
71
} __packed;
72
72
 
73
 
struct aufs_wh {
 
73
struct au_vdir_wh {
74
74
        struct hlist_node       wh_hash;
75
75
        aufs_bindex_t           wh_bindex;
76
76
#ifdef CONFIG_AUFS_SHWH
78
78
        unsigned char           wh_type;
79
79
        /* caution: packed */
80
80
#endif
81
 
        struct aufs_destr       wh_str;
 
81
        struct au_vdir_destr    wh_str;
82
82
} __packed;
83
83
 
84
 
union aufs_deblk_p {
85
 
        unsigned char   *p;
86
 
        aufs_deblk_t    *deblk;
87
 
        struct aufs_de  *de;
 
84
union au_vdir_deblk_p {
 
85
        unsigned char           *p;
 
86
        au_vdir_deblk_t         *deblk;
 
87
        struct au_vdir_de       *de;
88
88
};
89
89
 
90
 
struct aufs_vdir {
91
 
        aufs_deblk_t    **vd_deblk;
 
90
struct au_vdir {
 
91
        au_vdir_deblk_t **vd_deblk;
92
92
        int             vd_nblk;
93
93
        struct {
94
94
                int                     i;
95
 
                union aufs_deblk_p      p;
 
95
                union au_vdir_deblk_p   p;
96
96
        } vd_last;
97
97
 
98
98
        unsigned long   vd_version;
104
104
/* dir.c */
105
105
extern struct file_operations aufs_dir_fop;
106
106
int au_test_empty_lower(struct dentry *dentry);
107
 
int au_test_empty(struct dentry *dentry, struct aufs_nhash *whlist);
 
107
int au_test_empty(struct dentry *dentry, struct au_nhash *whlist);
108
108
void au_add_nlink(struct inode *dir, struct inode *h_dir);
109
109
void au_sub_nlink(struct inode *dir, struct inode *h_dir);
110
110
 
111
111
/* vdir.c */
112
 
struct aufs_nhash *nhash_new(gfp_t gfp);
113
 
void nhash_del(struct aufs_nhash *nhash);
114
 
void nhash_init(struct aufs_nhash *nhash);
115
 
void nhash_move(struct aufs_nhash *dst, struct aufs_nhash *src);
116
 
void nhash_fin(struct aufs_nhash *nhash);
117
 
int nhash_test_longer_wh(struct aufs_nhash *whlist, aufs_bindex_t btgt,
 
112
struct au_nhash *nhash_new(gfp_t gfp);
 
113
void nhash_del(struct au_nhash *nhash);
 
114
void nhash_init(struct au_nhash *nhash);
 
115
void nhash_move(struct au_nhash *dst, struct au_nhash *src);
 
116
void nhash_fin(struct au_nhash *nhash);
 
117
int nhash_test_longer_wh(struct au_nhash *whlist, aufs_bindex_t btgt,
118
118
                         int limit);
119
 
int nhash_test_known_wh(struct aufs_nhash *whlist, char *name, int namelen);
120
 
int nhash_append_wh(struct aufs_nhash *whlist, char *name, int namelen,
 
119
int nhash_test_known_wh(struct au_nhash *whlist, char *name, int namelen);
 
120
int nhash_append_wh(struct au_nhash *whlist, char *name, int namelen,
121
121
                    ino_t ino, unsigned int d_type, aufs_bindex_t bindex,
122
122
                    unsigned char shwh);
123
 
void au_vdir_free(struct aufs_vdir *vdir);
 
123
void au_vdir_free(struct au_vdir *vdir);
124
124
int au_vdir_init(struct file *file);
125
125
int au_fill_de(struct file *file, void *dirent, filldir_t filldir);
126
126
 
133
133
}
134
134
 
135
135
static inline
136
 
void au_shwh_init_wh(struct aufs_wh *wh, ino_t ino, unsigned char d_type)
 
136
void au_shwh_init_wh(struct au_vdir_wh *wh, ino_t ino, unsigned char d_type)
137
137
{
138
138
#ifdef CONFIG_AUFS_SHWH
139
139
        wh->wh_ino = ino;