diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-01-23 14:32:21 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-02-07 15:47:14 +0100 |
commit | e593b2bf513dd4d3fbfa0f435392eea2c7f776f0 (patch) | |
tree | 02d6f1b258c50b74ad8213c2d5ca0aa4c59dd16e /scripts/checkincludes.pl | |
parent | 01ad3eb8a07385bc8849f0ee7c800e7c8bd7287e (diff) |
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>
Diffstat (limited to 'scripts/checkincludes.pl')
0 files changed, 0 insertions, 0 deletions