28
28
#include <linux/version.h>
29
29
#include <linux/aufs_type.h>
31
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
32
typedef const char* au_parser_pattern_t;
31
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
32
typedef const char *au_parser_pattern_t;
34
typedef char* au_parser_pattern_t;
34
typedef char *au_parser_pattern_t;
37
37
/* ---------------------------------------------------------------------- */
40
/* external inode number bitmap and translation table */
47
/* users direct branch access */
61
/* policies to select one among multiple writable branches */
63
AuWbrCreate_TDP, /* top down parent */
64
AuWbrCreate_RR, /* round robin */
65
AuWbrCreate_MFS, /* most free space */
66
AuWbrCreate_MFSV, /* mfs with seconds */
67
AuWbrCreate_MFSRR, /* mfs then rr */
68
AuWbrCreate_MFSRRV, /* mfs then rr with seconds */
69
AuWbrCreate_PMFS, /* parent and mfs */
70
AuWbrCreate_PMFSV, /* parent and mfs with seconds */
75
AuWbrCopyup_TDP, /* top down parent */
76
AuWbrCopyup_BUP, /* bottom up parent */
77
AuWbrCopyup_BU /* bottom up */
80
/* revert it to bit-shift? */
81
struct au_opts_flags {
82
unsigned int f_xino:2;
83
unsigned int f_trunc_xino:1;
84
unsigned int f_udba:2;
85
unsigned int f_dlgt:1;
86
unsigned int f_plink:1;
87
unsigned int f_warn_perm:1;
89
unsigned int f_always_diropq:1;
90
unsigned int f_refrof:1;
91
unsigned int f_verbose:1;
92
unsigned int f_wbr_copyup:2;
93
unsigned int f_wbr_create:3;
96
/* ---------------------------------------------------------------------- */
40
99
aufs_bindex_t bindex;
43
102
struct nameidata nd;
48
107
struct dentry *h_root;
54
113
struct dentry *h_root;
59
118
struct file *file;
121
struct au_opt_xino_itrunc {
122
aufs_bindex_t bindex;
125
struct au_opt_xino_trunc_v {
130
struct au_opt_wbr_create {
139
struct au_opt_xino xino;
140
struct au_opt_xino_itrunc xino_itrunc;
141
struct au_opt_add add;
142
struct au_opt_del del;
143
struct au_opt_mod mod;
150
struct au_opt_wbr_create wbr_create;
159
struct au_opts_flags given;
161
unsigned int remount:1;
163
unsigned int refresh_dir:1;
164
unsigned int refresh_nondir:1;
165
unsigned int trunc_xib:1;
83
169
/* ---------------------------------------------------------------------- */
85
int br_perm_str(char *p, unsigned int len, int brperm);
86
au_parser_pattern_t udba_str(int udba);
87
void udba_set(struct super_block *sb, unsigned int flg);
88
//au_parser_pattern_t coo_str(int coo);
89
void au_free_opts(struct opts *opts);
90
int au_parse_opts(struct super_block *sb, char *str, struct opts *opts);
91
int au_do_opts_mount(struct super_block *sb, struct opts *opts);
92
int au_do_opts_remount(struct super_block *sb, struct opts *opts,
93
int *do_refresh, unsigned int *given);
171
void au_opts_flags_def(struct au_opts_flags *flags);
172
au_parser_pattern_t au_optstr_br_perm(int brperm);
173
au_parser_pattern_t au_optstr_udba(int udba);
174
au_parser_pattern_t au_optstr_coo(int coo);
175
au_parser_pattern_t au_optstr_wbr_copyup(int wbr_copyup);
176
au_parser_pattern_t au_optstr_wbr_create(int wbr_create);
178
void au_opts_free(struct au_opts *opts);
179
int au_opts_parse(struct super_block *sb, char *str, struct au_opts *opts);
180
int au_opts_mount(struct super_block *sb, struct au_opts *opts);
181
int au_opts_remount(struct super_block *sb, struct au_opts *opts);
95
183
#endif /* __KERNEL__ */
96
184
#endif /* __AUFS_OPTS_H__ */