1. 29 4月, 2020 1 次提交
  2. 15 1月, 2020 1 次提交
    • J
      alinux: ovl: implement async IO routines · 3e5dd02b
      Jiufei Xue 提交于
      A performance regression is observed since linux v4.19 when we do aio
      test using fio with iodepth 128 on overlayfs. And we found that queue
      depth of the device is always 1 which is unexpected.
      
      After investigation, it is found that commit 16914e6f
      ("ovl: add ovl_read_iter()") and commit 2a92e07e
      ("ovl: add ovl_write_iter()") use do_iter_readv_writev() to submit
      requests to real filesystem. Async IOs are converted to sync IOs here
      and cause performance regression.
      
      So implement async IO for stacked reading and writing.
      
      Changes since v1:
        - add a cleanup helper for completion/error handling
        - handle the case when aio_req allocation failed
      Signed-off-by: NJiufei Xue <jiufei.xue@linux.alibaba.com>
      Reviewed-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
      3e5dd02b
  3. 18 12月, 2019 2 次提交
    • A
      ovl: relax WARN_ON() on rename to self · f785f33c
      Amir Goldstein 提交于
      commit 6889ee5a53b8d969aa542047f5ac8acdc0e79a91 upstream.
      
      In ovl_rename(), if new upper is hardlinked to old upper underneath
      overlayfs before upper dirs are locked, user will get an ESTALE error
      and a WARN_ON will be printed.
      
      Changes to underlying layers while overlayfs is mounted may result in
      unexpected behavior, but it shouldn't crash the kernel and it shouldn't
      trigger WARN_ON() either, so relax this WARN_ON().
      
      Reported-by: syzbot+bb1836a212e69f8e201a@syzkaller.appspotmail.com
      Fixes: 804032fa ("ovl: don't check rename to self")
      Cc: <stable@vger.kernel.org> # v4.9+
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f785f33c
    • A
      ovl: fix corner case of non-unique st_dev;st_ino · 3e929ddf
      Amir Goldstein 提交于
      commit 9c6d8f13e9da10a26ad7f0a020ef86e8ef142835 upstream.
      
      On non-samefs overlay without xino, non pure upper inodes should use a
      pseudo_dev assigned to each unique lower fs and pure upper inodes use the
      real upper st_dev.
      
      It is fine for an overlay pure upper inode to use the same st_dev;st_ino
      values as the real upper inode, because the content of those two different
      filesystem objects is always the same.
      
      In this case, however:
       - two filesystems, A and B
       - upper layer is on A
       - lower layer 1 is also on A
       - lower layer 2 is on B
      
      Non pure upper overlay inode, whose origin is in layer 1 will have the same
      st_dev;st_ino values as the real lower inode. This may result with a false
      positive results of 'diff' between the real lower and copied up overlay
      inode.
      
      Fix this by using the upper st_dev;st_ino values in this case.  This breaks
      the property of constant st_dev;st_ino across copy up of this case. This
      breakage will be fixed by a later patch.
      
      Fixes: 5148626b ("ovl: allocate anon bdev per unique lower fs")
      Cc: stable@vger.kernel.org # v4.17+
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e929ddf
  4. 05 10月, 2019 2 次提交
  5. 21 9月, 2019 1 次提交
  6. 25 6月, 2019 6 次提交
    • A
      ovl: fix bogus -Wmaybe-unitialized warning · 0319ef1d
      Arnd Bergmann 提交于
      [ Upstream commit 1dac6f5b0ed2601be21bb4e27a44b0c3e667b7f4 ]
      
      gcc gets a bit confused by the logic in ovl_setup_trap() and
      can't figure out whether the local 'trap' variable in the caller
      was initialized or not:
      
      fs/overlayfs/super.c: In function 'ovl_fill_super':
      fs/overlayfs/super.c:1333:4: error: 'trap' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          iput(trap);
          ^~~~~~~~~~
      fs/overlayfs/super.c:1312:17: note: 'trap' was declared here
      
      Reword slightly to make it easier for the compiler to understand.
      
      Fixes: 146d62e5a586 ("ovl: detect overlapping layers")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      0319ef1d
    • M
      ovl: don't fail with disconnected lower NFS · 639e8c2f
      Miklos Szeredi 提交于
      [ Upstream commit 9179c21dc6ed1c993caa5fe4da876a6765c26af7 ]
      
      NFS mounts can be disconnected from fs root.  Don't fail the overlapping
      layer check because of this.
      
      The check is not authoritative anyway, since topology can change during or
      after the check.
      Reported-by: NAntti Antinoja <antti@fennosys.fi>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 146d62e5a586 ("ovl: detect overlapping layers")
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      639e8c2f
    • A
      ovl: detect overlapping layers · f1c5aa5e
      Amir Goldstein 提交于
      [ Upstream commit 146d62e5a5867fbf84490d82455718bfb10fe824 ]
      
      Overlapping overlay layers are not supported and can cause unexpected
      behavior, but overlayfs does not currently check or warn about these
      configurations.
      
      User is not supposed to specify the same directory for upper and
      lower dirs or for different lower layers and user is not supposed to
      specify directories that are descendants of each other for overlay
      layers, but that is exactly what this zysbot repro did:
      
          https://syzkaller.appspot.com/x/repro.syz?x=12c7a94f400000
      
      Moving layer root directories into other layers while overlayfs
      is mounted could also result in unexpected behavior.
      
      This commit places "traps" in the overlay inode hash table.
      Those traps are dummy overlay inodes that are hashed by the layers
      root inodes.
      
      On mount, the hash table trap entries are used to verify that overlay
      layers are not overlapping.  While at it, we also verify that overlay
      layers are not overlapping with directories "in-use" by other overlay
      instances as upperdir/workdir.
      
      On lookup, the trap entries are used to verify that overlay layers
      root inodes have not been moved into other layers after mount.
      
      Some examples:
      
      $ ./run --ov --samefs -s
      ...
      ( mkdir -p base/upper/0/u base/upper/0/w base/lower lower upper mnt
        mount -o bind base/lower lower
        mount -o bind base/upper upper
        mount -t overlay none mnt ...
              -o lowerdir=lower,upperdir=upper/0/u,workdir=upper/0/w)
      
      $ umount mnt
      $ mount -t overlay none mnt ...
              -o lowerdir=base,upperdir=upper/0/u,workdir=upper/0/w
      
        [   94.434900] overlayfs: overlapping upperdir path
        mount: mount overlay on mnt failed: Too many levels of symbolic links
      
      $ mount -t overlay none mnt ...
              -o lowerdir=upper/0/u,upperdir=upper/0/u,workdir=upper/0/w
      
        [  151.350132] overlayfs: conflicting lowerdir path
        mount: none is already mounted or mnt busy
      
      $ mount -t overlay none mnt ...
              -o lowerdir=lower:lower/a,upperdir=upper/0/u,workdir=upper/0/w
      
        [  201.205045] overlayfs: overlapping lowerdir path
        mount: mount overlay on mnt failed: Too many levels of symbolic links
      
      $ mount -t overlay none mnt ...
              -o lowerdir=lower,upperdir=upper/0/u,workdir=upper/0/w
      $ mv base/upper/0/ base/lower/
      $ find mnt/0
        mnt/0
        mnt/0/w
        find: 'mnt/0/w/work': Too many levels of symbolic links
        find: 'mnt/0/u': Too many levels of symbolic links
      
      Reported-by: syzbot+9c69c282adc4edd2b540@syzkaller.appspotmail.com
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      f1c5aa5e
    • A
      ovl: make i_ino consistent with st_ino in more cases · a00f405e
      Amir Goldstein 提交于
      [ Upstream commit 6dde1e42f497b2d4e22466f23019016775607947 ]
      
      Relax the condition that overlayfs supports nfs export, to require
      that i_ino is consistent with st_ino/d_ino.
      
      It is enough to require that st_ino and d_ino are consistent.
      
      This fixes the failure of xfstest generic/504, due to mismatch of
      st_ino to inode number in the output of /proc/locks.
      
      Fixes: 12574a9f ("ovl: consistent i_ino for non-samefs with xino")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      a00f405e
    • A
      ovl: fix wrong flags check in FS_IOC_FS[SG]ETXATTR ioctls · d6623379
      Amir Goldstein 提交于
      [ Upstream commit 941d935ac7636911a3fd8fa80e758e52b0b11e20 ]
      
      The ioctl argument was parsed as the wrong type.
      
      Fixes: b21d9c435f93 ("ovl: support the FS_IOC_FS[SG]ETXATTR ioctls")
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      d6623379
    • A
      ovl: support the FS_IOC_FS[SG]ETXATTR ioctls · 3cb5d7fa
      Amir Goldstein 提交于
      [ Upstream commit b21d9c435f935014d3e3fa6914f2e4fbabb0e94d ]
      
      They are the extended version of FS_IOC_FS[SG]ETFLAGS ioctls.
      xfs_io -c "chattr <flags>" uses the new ioctls for setting flags.
      
      This used to work in kernel pre v4.19, before stacked file ops
      introduced the ovl_ioctl whitelist.
      Reported-by: NDave Chinner <david@fromorbit.com>
      Fixes: d1d04ef8 ("ovl: stack file ops")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3cb5d7fa
  7. 15 6月, 2019 3 次提交
  8. 31 5月, 2019 1 次提交
    • A
      ovl: relax WARN_ON() for overlapping layers use case · 86c43c40
      Amir Goldstein 提交于
      commit acf3062a7e1ccf67c6f7e7c28671a6708fde63b0 upstream.
      
      This nasty little syzbot repro:
      https://syzkaller.appspot.com/x/repro.syz?x=12c7a94f400000
      
      Creates overlay mounts where the same directory is both in upper and lower
      layers. Simplified example:
      
        mkdir foo work
        mount -t overlay none foo -o"lowerdir=.,upperdir=foo,workdir=work"
      
      The repro runs several threads in parallel that attempt to chdir into foo
      and attempt to symlink/rename/exec/mkdir the file bar.
      
      The repro hits a WARN_ON() I placed in ovl_instantiate(), which suggests
      that an overlay inode already exists in cache and is hashed by the pointer
      of the real upper dentry that ovl_create_real() has just created. At the
      point of the WARN_ON(), for overlay dir inode lock is held and upper dir
      inode lock, so at first, I did not see how this was possible.
      
      On a closer look, I see that after ovl_create_real(), because of the
      overlapping upper and lower layers, a lookup by another thread can find the
      file foo/bar that was just created in upper layer, at overlay path
      foo/foo/bar and hash the an overlay inode with the new real dentry as lower
      dentry. This is possible because the overlay directory foo/foo is not
      locked and the upper dentry foo/bar is in dcache, so ovl_lookup() can find
      it without taking upper dir inode shared lock.
      
      Overlapping layers is considered a wrong setup which would result in
      unexpected behavior, but it shouldn't crash the kernel and it shouldn't
      trigger WARN_ON() either, so relax this WARN_ON() and leave a pr_warn()
      instead to cover all cases of failure to get an overlay inode.
      
      The error returned from failure to insert new inode to cache with
      inode_insert5() was changed to -EEXIST, to distinguish from the error
      -ENOMEM returned on failure to get/allocate inode with iget5_locked().
      
      Reported-by: syzbot+9c69c282adc4edd2b540@syzkaller.appspotmail.com
      Fixes: 01b39dcc ("ovl: use inode_insert5() to hash a newly...")
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86c43c40
  9. 26 5月, 2019 1 次提交
  10. 24 3月, 2019 2 次提交
  11. 20 12月, 2018 2 次提交
    • A
      ovl: fix missing override creds in link of a metacopy upper · 2a335229
      Amir Goldstein 提交于
      commit 91ff20f34e94424e586f57f4f593beae16504f86 upstream.
      
      Theodore Ts'o reported a v4.19 regression with docker-dropbox:
      https://marc.info/?l=linux-fsdevel&m=154070089431116&w=2
      
      "I was rebuilding my dropbox Docker container, and it failed in 4.19
       with the following error:
       ...
       dpkg: error: error creating new backup file \
                    '/var/lib/dpkg/status-old': Invalid cross-device link"
      
      The problem did not reproduce with metacopy feature disabled.
      The error was caused by insufficient credentials to set
      "trusted.overlay.redirect" xattr on link of a metacopy file.
      
      Reproducer:
      
       echo Y > /sys/module/overlay/parameters/redirect_dir
       echo Y > /sys/module/overlay/parameters/metacopy
       cd /tmp
       mkdir l u w m
       chmod 777 l u
       touch l/foo
       ln l/foo l/link
       chmod 666 l/foo
       mount -t overlay none -olowerdir=l,upperdir=u,workdir=w m
       su fsgqa
       ln m/foo m/bar
       [   21.455823] overlayfs: failed to set redirect (-1)
       ln: failed to create hard link 'm/bar' => 'm/foo':\
           Invalid cross-device link
      Reported-by: NTheodore Y. Ts'o <tytso@mit.edu>
      Reported-by: NMaciej Zięba <maciekz82@gmail.com>
      Fixes: 4120fe64 ("ovl: Set redirect on upper inode when it is linked")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2a335229
    • A
      ovl: fix decode of dir file handle with multi lower layers · 3faf68a4
      Amir Goldstein 提交于
      commit 155b8a0492a90a4c6e22f046a3568b92a6bc48da upstream.
      
      When decoding a lower file handle, we first call ovl_check_origin_fh()
      with connected=false to get any real lower dentry for overlay inode
      cache lookup.
      
      If the real dentry is a disconnected dir dentry, ovl_check_origin_fh()
      is called again with connected=true to get a connected real dentry
      and find the lower layer the real dentry belongs to.
      
      If the first call returned a connected real dentry, we use it to
      lookup an overlay connected dentry, but the first ovl_check_origin_fh()
      call with connected=false did not check that the found dentry is under
      the root of the layer (see ovl_acceptable()), it only checked that
      the found dentry super block matches the uuid of the lower file handle.
      
      In case there are multiple lower layers on the same fs and the found
      dentry is not from the top most lower layer, using the layer index
      returned from the first ovl_check_origin_fh() is wrong and we end
      up failing to decode the file handle.
      
      Fix this by always calling ovl_check_origin_fh() with connected=true
      if we got a directory dentry in the first call.
      
      Fixes: 8b58924a ("ovl: lookup in inode cache first when decoding...")
      Cc: <stable@vger.kernel.org> # v4.17
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3faf68a4
  12. 21 11月, 2018 4 次提交
    • M
      ovl: automatically enable redirect_dir on metacopy=on · be677259
      Miklos Szeredi 提交于
      commit d47748e5ae5af6572e520cc9767bbe70c22ea498 upstream.
      
      Current behavior is to automatically disable metacopy if redirect_dir is
      not enabled and proceed with the mount.
      
      If "metacopy=on" mount option was given, then this behavior can confuse the
      user: no mount failure, yet metacopy is disabled.
      
      This patch makes metacopy=on imply redirect_dir=on.
      
      The converse is also true: turning off full redirect with redirect_dir=
      {off|follow|nofollow} will disable metacopy.
      
      If both metacopy=on and redirect_dir={off|follow|nofollow} is specified,
      then mount will fail, since there's no way to correctly resolve the
      conflict.
      Reported-by: NDaniel Walsh <dwalsh@redhat.com>
      Fixes: d5791044 ("ovl: Provide a mount option metacopy=on/off...")
      Cc: <stable@vger.kernel.org> # v4.19
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      be677259
    • M
      ovl: check whiteout in ovl_create_over_whiteout() · dee4ce11
      Miklos Szeredi 提交于
      commit 5e1275808630ea3b2c97c776f40e475017535f72 upstream.
      
      Kaixuxia repors that it's possible to crash overlayfs by removing the
      whiteout on the upper layer before creating a directory over it.  This is a
      reproducer:
      
       mkdir lower upper work merge
       touch lower/file
       mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merge
       rm merge/file
       ls -al merge/file
       rm upper/file
       ls -al merge/
       mkdir merge/file
      
      Before commencing with a vfs_rename(..., RENAME_EXCHANGE) verify that the
      lookup of "upper" is positive and is a whiteout, and return ESTALE
      otherwise.
      
      Reported by: kaixuxia <xiakaixu1987@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Fixes: e9be9d5e ("overlay filesystem")
      Cc: <stable@vger.kernel.org> # v3.18
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dee4ce11
    • A
      ovl: fix recursive oi->lock in ovl_link() · 72f6852d
      Amir Goldstein 提交于
      commit 6cd078702f2f33cb6b19a682de3e9184112f1a46 upstream.
      
      linking a non-copied-up file into a non-copied-up parent results in a
      nested call to mutex_lock_interruptible(&oi->lock). Fix this by copying up
      target parent before ovl_nlink_start(), same as done in ovl_rename().
      
      ~/unionmount-testsuite$ ./run --ov -s
      ~/unionmount-testsuite$ ln /mnt/a/foo100 /mnt/a/dir100/
      
       WARNING: possible recursive locking detected
       --------------------------------------------
       ln/1545 is trying to acquire lock:
       00000000bcce7c4c (&ovl_i_lock_key[depth]){+.+.}, at:
           ovl_copy_up_start+0x28/0x7d
       but task is already holding lock:
       0000000026d73d5b (&ovl_i_lock_key[depth]){+.+.}, at:
           ovl_nlink_start+0x3c/0xc1
      
      [SzM: this seems to be a false positive, but doing the copy-up first is
      harmless and removes the lockdep splat]
      
      Reported-by: syzbot+3ef5c0d1a5cb0b21e6be@syzkaller.appspotmail.com
      Fixes: 5f8415d6 ("ovl: persistent overlay inode nlink for...")
      Cc: <stable@vger.kernel.org> # v4.13
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72f6852d
    • A
      ovl: fix error handling in ovl_verify_set_fh() · 37403ba3
      Amir Goldstein 提交于
      commit babf4770be0adc69e6d2de150f4040f175e24beb upstream.
      
      We hit a BUG on kfree of an ERR_PTR()...
      
      Reported-by: syzbot+ff03fe05c717b82502d0@syzkaller.appspotmail.com
      Fixes: 8b88a2e6 ("ovl: verify upper root dir matches lower root dir")
      Cc: <stable@vger.kernel.org> # v4.13
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      37403ba3
  13. 04 10月, 2018 2 次提交
    • M
      ovl: fix format of setxattr debug · 1a8f8d2a
      Miklos Szeredi 提交于
      Format has a typo: it was meant to be "%.*s", not "%*s".  But at some point
      callers grew nonprintable values as well, so use "%*pE" instead with a
      maximized length.
      Reported-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 3a1e819b ("ovl: store file handle of lower inode on copy up")
      Cc: <stable@vger.kernel.org> # v4.12
      1a8f8d2a
    • A
      ovl: fix access beyond unterminated strings · 601350ff
      Amir Goldstein 提交于
      KASAN detected slab-out-of-bounds access in printk from overlayfs,
      because string format used %*s instead of %.*s.
      
      > BUG: KASAN: slab-out-of-bounds in string+0x298/0x2d0 lib/vsprintf.c:604
      > Read of size 1 at addr ffff8801c36c66ba by task syz-executor2/27811
      >
      > CPU: 0 PID: 27811 Comm: syz-executor2 Not tainted 4.19.0-rc5+ #36
      ...
      >  printk+0xa7/0xcf kernel/printk/printk.c:1996
      >  ovl_lookup_index.cold.15+0xe8/0x1f8 fs/overlayfs/namei.c:689
      
      Reported-by: syzbot+376cea2b0ef340db3dd4@syzkaller.appspotmail.com
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 359f392c ("ovl: lookup index entry for copy up origin")
      Cc: <stable@vger.kernel.org> # v4.13
      601350ff
  14. 26 9月, 2018 1 次提交
  15. 24 9月, 2018 4 次提交
  16. 10 9月, 2018 1 次提交
  17. 03 9月, 2018 1 次提交
  18. 30 8月, 2018 2 次提交
    • A
      ovl: fix GPF in swapfile_activate of file from overlayfs over xfs · 5b910bd6
      Amir Goldstein 提交于
      Since overlayfs implements stacked file operations, the underlying
      filesystems are not supposed to be exposed to the overlayfs file,
      whose f_inode is an overlayfs inode.
      
      Assigning an overlayfs file to swap_file results in an attempt of xfs
      code to dereference an xfs_inode struct from an ovl_inode pointer:
      
       CPU: 0 PID: 2462 Comm: swapon Not tainted
       4.18.0-xfstests-12721-g33e17876 #3402
       RIP: 0010:xfs_find_bdev_for_inode+0x23/0x2f
       Call Trace:
        xfs_iomap_swapfile_activate+0x1f/0x43
        __se_sys_swapon+0xb1a/0xee9
      
      Fix this by not assigning the real inode mapping to f_mapping, which
      will cause swapon() to return an error (-EINVAL). Although it makes
      sense not to allow setting swpafile on an overlayfs file, some users
      may depend on it, so we may need to fix this up in the future.
      
      Keeping f_mapping pointing to overlay inode mapping will cause O_DIRECT
      open to fail. Fix this by installing ovl_aops with noop_direct_IO in
      overlay inode mapping.
      
      Keeping f_mapping pointing to overlay inode mapping will cause other
      a_ops related operations to fail (e.g. readahead()). Those will be
      fixed by follow up patches.
      Suggested-by: NMiklos Szeredi <mszeredi@redhat.com>
      Fixes: f7c72396 ("ovl: add O_DIRECT support")
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      5b910bd6
    • A
      ovl: respect FIEMAP_FLAG_SYNC flag · 80d34810
      Amir Goldstein 提交于
      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: 9e142c41 ("ovl: add ovl_fiemap()")
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      80d34810
  19. 23 8月, 2018 1 次提交
  20. 20 7月, 2018 2 次提交