]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xfs: extent shifting doesn't fully invalidate page cache
authorDave Chinner <dchinner@redhat.com>
Mon, 19 Nov 2018 21:31:09 +0000 (13:31 -0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:57 +0000 (14:22 -0300)
commit946c1ccf6ac18d54e93373f7011b14347d749370
tree69db00e0abcaf727f1bcf12baf020bce08dfd7ad
parent6f43e071f1af6ba95df82c9fb899aae695a72059
xfs: extent shifting doesn't fully invalidate page cache

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce ]

The extent shifting code uses a flush and invalidate mechainsm prior
to shifting extents around. This is similar to what
xfs_free_file_space() does, but it doesn't take into account things
like page cache vs block size differences, and it will fail if there
is a page that it currently busy.

xfs_flush_unmap_range() handles all of these cases, so just convert
xfs_prepare_shift() to us that mechanism rather than having it's own
special sauce.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/xfs/xfs_bmap_util.c