ovl: do not reconnect upper index records in ovl_indexdir_cleanup()
authorAmir Goldstein <amir73il@gmail.com>
Tue, 4 Oct 2022 10:34:32 +0000 (13:34 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 8 Dec 2022 09:49:46 +0000 (10:49 +0100)
commit8ea2876577b57805489e3044de7fcb0330c52f40
tree38eb0262d879d358a4a306884f1beddb63b2e72d
parentcdf5c9d1af411057e33cfbeba02ce19478dedb1e
ovl: do not reconnect upper index records in ovl_indexdir_cleanup()

ovl_indexdir_cleanup() is called on mount of overayfs with nfs_export
feature to cleanup stale index records for lower and upper files that have
been deleted while overlayfs was offline.

This has the side effect (good or bad) of pre populating inode cache with
all the copied up upper inodes, while verifying the index entries.

For copied up directories, the upper file handles are decoded to conncted
upper dentries.  This has the even bigger side effect of reading the
content of all the parent upper directories which may take significantly
more time and IO than just reading the upper inodes.

Do not request connceted upper dentries for verifying upper directory index
entries, because we have no use for the connected dentry.

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