[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache
On Wed, Dec 11, 2019 at 04:03:52PM +0100, Greg Kroah-Hartman wrote:
> From: Dave Chinner <>
> [ 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 <>
> Reviewed-by: Christoph Hellwig <>
> Reviewed-by: Darrick J. Wong <>
> Signed-off-by: Darrick J. Wong <>
> Signed-off-by: Sasha Levin <>

This commit also required following commit:

commit 1749d1ea89bdf3181328b7d846e609d5a0e53e50
Author: Brian Foster <>
Date: Fri Apr 26 07:30:24 2019 -0700

xfs: add missing error check in xfs_prepare_shift()

xfs_prepare_shift() fails to check the error return from
xfs_flush_unmap_range(). If the latter fails, that could lead to an
insert/collapse range operation over a delalloc range, which is not

Add an error check and return appropriately. This is reproduced
rarely by generic/475.

Fixes: 7f9f71be84bc ("xfs: extent shifting doesn't fully invalidate page cache")
Signed-off-by: Brian Foster <>
Reviewed-by: Darrick J. Wong <>
Signed-off-by: Darrick J. Wong <>
Reviewed-by: Allison Collins <>
Reviewed-by: Dave Chinner <>

Best regards,

 \ /
  Last update: 2019-12-12 00:27    [W:0.687 / U:4.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site