]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
xfs: don't unconditionally clear the reflink flag on zero-block files
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 18 Sep 2017 16:41:16 +0000 (09:41 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 16 Nov 2017 13:23:20 +0000 (11:23 -0200)
commitdc439ab4a65bb675c26e135e33a701e5f1641a61
tree8a19e4787db54b9bc4267f8f7d18c73fd0263c7e
parent8ae0b7c3f7f57644649c627f4225eba91c01f4a6
xfs: don't unconditionally clear the reflink flag on zero-block files

BugLink: http://bugs.launchpad.net/bugs/1731951
commit cc6f77710a6de6210f9feda7cd53e2f5ee7a7e69 upstream.

If we have speculative cow preallocations hanging around in the cow
fork, don't let a truncate operation clear the reflink flag because if
we do then there's a chance we'll forget to free those extents when we
destroy the incore inode.

Reported-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/xfs/xfs_inode.c