diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-08-27 15:55:59 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-08-30 17:08:35 +0200 |
commit | 80d34810815b1d708e3e59901a2afcdbd90c2a6f (patch) | |
tree | 8d20ff41f27c2b86666654cb8cb1b0721ab794fe /fs | |
parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) |
ovl: respect FIEMAP_FLAG_SYNC flag
Stacked overlayfs fiemap operation broke xfstests that test delayed
allocation (with "_test_generic_punch -d"), because ovl_fiemap()
failed to write dirty pages when requested.
Fixes: 9e142c4102db ("ovl: add ovl_fiemap()")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index e0bb217c01e2..5014749fd4b4 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -467,6 +467,10 @@ static int ovl_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, return -EOPNOTSUPP; old_cred = ovl_override_creds(inode->i_sb); + + if (fieinfo->fi_flags & FIEMAP_FLAG_SYNC) + filemap_write_and_wait(realinode->i_mapping); + err = realinode->i_op->fiemap(realinode, fieinfo, start, len); revert_creds(old_cred); |