ovl: re-structure overlay lower layers in-memory
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Mon, 24 Jul 2017 06:57:54 +0000 (01:57 -0500)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 9 Nov 2017 09:23:27 +0000 (10:23 +0100)
commitb93436320c1e9089a055941523571cd7c037f7cb
treec97ece67e4499dd7b184b728272786b597aed681
parentee023c30d7d6bc21d3a85f3625a30209bdcc41e6
ovl: re-structure overlay lower layers in-memory

Define new structures to represent overlay instance lower layers and
overlay merge dir lower layers to make room for storing more per layer
information in-memory.

Instead of keeping the fs instance lower layers in an array of struct
vfsmount, keep them in an array of new struct ovl_layer, that has a
pointer to struct vfsmount.

Instead of keeping the dentry lower layers in an array of struct path,
keep them in an array of new struct ovl_path, that has a pointer to
struct dentry and to struct ovl_layer.

Add a small helper to find the fs layer id that correspopnds to a lower
struct ovl_path and use it in ovl_lookup().

[amir: split re-structure from anonymous bdev patch]

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/namei.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/readdir.c
fs/overlayfs/super.c
fs/overlayfs/util.c