aboutsummaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/overlayfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r--fs/overlayfs/overlayfs.h18
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 @@
12struct ovl_entry; 12struct ovl_entry;
13 13
14enum ovl_path_type { 14enum 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
21extern 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
23static inline int ovl_do_rmdir(struct inode *dir, struct dentry *dentry) 30static 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);
130void ovl_path_upper(struct dentry *dentry, struct path *path); 137void ovl_path_upper(struct dentry *dentry, struct path *path);
131void ovl_path_lower(struct dentry *dentry, struct path *path); 138void ovl_path_lower(struct dentry *dentry, struct path *path);
132enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); 139enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path);
140int ovl_path_next(int idx, struct dentry *dentry, struct path *path);
133struct dentry *ovl_dentry_upper(struct dentry *dentry); 141struct dentry *ovl_dentry_upper(struct dentry *dentry);
134struct dentry *ovl_dentry_lower(struct dentry *dentry); 142struct dentry *ovl_dentry_lower(struct dentry *dentry);
135struct dentry *ovl_dentry_real(struct dentry *dentry); 143struct dentry *ovl_dentry_real(struct dentry *dentry);