This source file includes following definitions.
- OVL_E
- OVL_I
- ovl_upperdentry_dereference
1
2
3
4
5
6
7
8 struct ovl_config {
9 char *lowerdir;
10 char *upperdir;
11 char *workdir;
12 bool default_permissions;
13 bool redirect_dir;
14 bool redirect_follow;
15 const char *redirect_mode;
16 bool index;
17 bool nfs_export;
18 int xino;
19 bool metacopy;
20 };
21
22 struct ovl_sb {
23 struct super_block *sb;
24 dev_t pseudo_dev;
25
26 bool bad_uuid;
27 };
28
29 struct ovl_layer {
30 struct vfsmount *mnt;
31
32 struct inode *trap;
33 struct ovl_sb *fs;
34
35 int idx;
36
37 int fsid;
38 };
39
40 struct ovl_path {
41 struct ovl_layer *layer;
42 struct dentry *dentry;
43 };
44
45
46 struct ovl_fs {
47 struct vfsmount *upper_mnt;
48 unsigned int numlower;
49
50 unsigned int numlowerfs;
51 struct ovl_layer *lower_layers;
52 struct ovl_sb *lower_fs;
53
54 struct dentry *workbasedir;
55
56 struct dentry *workdir;
57
58 struct dentry *indexdir;
59 long namelen;
60
61 struct ovl_config config;
62
63 const struct cred *creator_cred;
64 bool tmpfile;
65 bool noxattr;
66
67 bool upperdir_locked;
68 bool workdir_locked;
69
70 struct inode *upperdir_trap;
71 struct inode *workbasedir_trap;
72 struct inode *workdir_trap;
73 struct inode *indexdir_trap;
74
75 unsigned int xino_bits;
76 };
77
78
79 struct ovl_entry {
80 union {
81 struct {
82 unsigned long flags;
83 };
84 struct rcu_head rcu;
85 };
86 unsigned numlower;
87 struct ovl_path lowerstack[];
88 };
89
90 struct ovl_entry *ovl_alloc_entry(unsigned int numlower);
91
92 static inline struct ovl_entry *OVL_E(struct dentry *dentry)
93 {
94 return (struct ovl_entry *) dentry->d_fsdata;
95 }
96
97 struct ovl_inode {
98 union {
99 struct ovl_dir_cache *cache;
100 struct inode *lowerdata;
101 };
102 const char *redirect;
103 u64 version;
104 unsigned long flags;
105 struct inode vfs_inode;
106 struct dentry *__upperdentry;
107 struct inode *lower;
108
109
110 struct mutex lock;
111 };
112
113 static inline struct ovl_inode *OVL_I(struct inode *inode)
114 {
115 return container_of(inode, struct ovl_inode, vfs_inode);
116 }
117
118 static inline struct dentry *ovl_upperdentry_dereference(struct ovl_inode *oi)
119 {
120 return READ_ONCE(oi->__upperdentry);
121 }