linux_dsm_epyc7002/fs/overlayfs
Amir Goldstein e593b2bf51 ovl: properly implement sync_filesystem()
overlayfs syncs all inode pages on sync_filesystem(), but it also
needs to call s_op->sync_fs() of upper fs for metadata sync.

This fixes correctness of syncfs(2) as demonstrated by following
xfs specific test:

xfs_sync_stats()
{
	echo $1
	echo -n "xfs_log_force = "
	grep log /proc/fs/xfs/stat  | awk '{ print $5 }'
}

xfs_sync_stats "before touch"
touch x
xfs_sync_stats "after touch"
xfs_io -c syncfs .
xfs_sync_stats "after syncfs"
xfs_io -c fsync x
xfs_sync_stats "after fsync"
xfs_io -c fsync x
xfs_sync_stats "after fsync #2"

When this test is run in overlay mount over xfs, log force
count does not increase with syncfs command.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2017-02-07 15:47:14 +01:00
..
copy_up.c ovl: concurrent copy up of regular files 2017-02-07 15:47:14 +01:00
dir.c ovl: clean up kstat usage 2016-12-16 11:02:57 +01:00
inode.c Merge uncontroversial parts of branch 'readlink' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs 2016-12-17 19:16:12 -08:00
Kconfig ovl: allow redirect_dir to default to "on" 2016-12-16 11:02:57 +01:00
Makefile ovl: split super.c 2016-12-16 11:02:56 +01:00
namei.c ovl: lookup redirects 2016-12-16 11:02:56 +01:00
overlayfs.h ovl: introduce copy up waitqueue 2017-02-07 15:47:14 +01:00
ovl_entry.h ovl: introduce copy up waitqueue 2017-02-07 15:47:14 +01:00
readdir.c ovl: proper cleanup of workdir 2016-09-01 11:11:59 +02:00
super.c ovl: properly implement sync_filesystem() 2017-02-07 15:47:14 +01:00
util.c ovl: introduce copy up waitqueue 2017-02-07 15:47:14 +01:00