diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-13 00:59:44 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-13 00:59:44 +0100 |
commit | 9d7459d834c28f55c82f1737f638a6c90e0c0e0f (patch) | |
tree | f84ddaacf935a2bc411b79e637cd73e109a56225 /fs/overlayfs/super.c | |
parent | 5ef88da56a77bfb3b9631f5e5775f3bff86b6219 (diff) |
ovl: multi-layer readdir
If multiple lower layers exist, merge them as well in readdir according to
the same rules as merging upper with lower. I.e. take whiteouts and opaque
directories into account on all but the lowers layer.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 07e4c576e93e..c245043aa1b9 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -81,6 +81,9 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry) } else if (!oe->opaque) { type |= __OVL_PATH_PURE; } + } else { + if (oe->numlower > 1) + type |= __OVL_PATH_MERGE; } return type; } |