]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ovl: cleanup bad and stale index entries on mount
authorAmir Goldstein <amir73il@gmail.com>
Wed, 21 Jun 2017 12:28:42 +0000 (15:28 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 4 Jul 2017 20:03:17 +0000 (22:03 +0200)
commit415543d5c64fe490b4b6a7e21c3ea2f1310c442f
treefe8d24c2f1b441845f29eece566cbd45be00d3ee
parent359f392ca53e9122cafa5fc103545558b0b85d54
ovl: cleanup bad and stale index entries on mount

Bad index entries are entries whose name does not match the
origin file handle stored in trusted.overlay.origin xattr.
Bad index entries could be a result of a system power off in
the middle of copy up.

Stale index entries are entries whose origin file handle is
stale. Stale index entries could be a result of copying layers
or removing lower entries while the overlay is not mounted.
The case of copying layers should be detected earlier by the
verification of upper root dir origin and index dir origin.

Both bad and stale index entries are detected and removed
on mount.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/dir.c
fs/overlayfs/namei.c
fs/overlayfs/overlayfs.h
fs/overlayfs/readdir.c
fs/overlayfs/super.c