ovl: allocate anonymous devs for lowerdirs

Generate unique values of st_dev per lower layer for non-samefs
overlay mount. The unique values are obtained by allocating anonymous
bdevs for each of the lowerdirs in the overlayfs instance.

The anonymous bdev is going to be returned by stat(2) for lowerdir
non-dir entries in non-samefs case.

[amir: split from ovl_getattr() and re-structure patches]

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>
This commit is contained in:
Chandan Rajendra
2017-11-01 20:12:49 +02:00
committed by Miklos Szeredi
parent b93436320c
commit 2a9c6d066e
2 changed files with 17 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ struct ovl_config {
struct ovl_layer {
struct vfsmount *mnt;
dev_t pseudo_dev;
};
struct ovl_path {