diff options
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 814bed33dd07..17ac5afc9ffb 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h | |||
@@ -12,13 +12,20 @@ | |||
12 | struct ovl_entry; | 12 | struct ovl_entry; |
13 | 13 | ||
14 | enum ovl_path_type { | 14 | enum ovl_path_type { |
15 | OVL_PATH_PURE_UPPER, | 15 | __OVL_PATH_PURE = (1 << 0), |
16 | OVL_PATH_UPPER, | 16 | __OVL_PATH_UPPER = (1 << 1), |
17 | OVL_PATH_MERGE, | 17 | __OVL_PATH_MERGE = (1 << 2), |
18 | OVL_PATH_LOWER, | ||
19 | }; | 18 | }; |
20 | 19 | ||
21 | extern const char *ovl_opaque_xattr; | 20 | #define OVL_TYPE_UPPER(type) ((type) & __OVL_PATH_UPPER) |
21 | #define OVL_TYPE_MERGE(type) ((type) & __OVL_PATH_MERGE) | ||
22 | #define OVL_TYPE_PURE_UPPER(type) ((type) & __OVL_PATH_PURE) | ||
23 | #define OVL_TYPE_MERGE_OR_LOWER(type) \ | ||
24 | (OVL_TYPE_MERGE(type) || !OVL_TYPE_UPPER(type)) | ||
25 | |||
26 | #define OVL_XATTR_PRE_NAME "trusted.overlay." | ||
27 | #define OVL_XATTR_PRE_LEN 16 | ||
28 | #define OVL_XATTR_OPAQUE OVL_XATTR_PRE_NAME"opaque" | ||
22 | 29 | ||
23 | static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) | 30 | static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) |
24 | { | 31 | { |
@@ -130,6 +137,7 @@ void ovl_dentry_version_inc(struct dentry *dentry); | |||
130 | void ovl_path_upper(struct dentry *dentry, struct path *path); | 137 | void ovl_path_upper(struct dentry *dentry, struct path *path); |
131 | void ovl_path_lower(struct dentry *dentry, struct path *path); | 138 | void ovl_path_lower(struct dentry *dentry, struct path *path); |
132 | enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); | 139 | enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); |
140 | int ovl_path_next(int idx, struct dentry *dentry, struct path *path); | ||
133 | struct dentry *ovl_dentry_upper(struct dentry *dentry); | 141 | struct dentry *ovl_dentry_upper(struct dentry *dentry); |
134 | struct dentry *ovl_dentry_lower(struct dentry *dentry); | 142 | struct dentry *ovl_dentry_lower(struct dentry *dentry); |
135 | struct dentry *ovl_dentry_real(struct dentry *dentry); | 143 | struct dentry *ovl_dentry_real(struct dentry *dentry); |