[Ocfs2-devel] [PATCH 03/15] xfs: zero posteof blocks when cloning above eof

Dave Chinner david at fromorbit.com
Thu Oct 4 22:28:39 PDT 2018


On Thu, Oct 04, 2018 at 05:44:54PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong at oracle.com>
> 
> When we're reflinking between two files and the destination file range
> is well beyond the destination file's EOF marker, zero any posteof
> speculative preallocations in the destination file so that we don't
> expose stale disk contents.  The previous strategy of trying to clear
> the preallocations does not work if the destination file has the
> PREALLOC flag set.
> 
> Uncovered by shared/010.
> 
> Reported-by: Zorro Lang <zlang at redhat.com>
> Bugzilla-id: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.kernel.org_show-5Fbug.cgi-3Fid-3D201259&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=C7gAd4uDxlAvTdc0vmU6X8CMk6L2iDY8-HD0qT6Fo7Y&m=Jt3V3HpXf-NaJTVVKEWK881PgcOTureFbFgSqu7fhDQ&s=S0cjIrf21ndOPm5VlFKcHb9vya2G2W-ZcpF0qJjBHM4&e=
> Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>
> ---
>  fs/xfs/xfs_reflink.c |   33 +++++++++++++++++++++++++--------
>  1 file changed, 25 insertions(+), 8 deletions(-)

Looks good.

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com



More information about the Ocfs2-devel mailing list