From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 17 Oct 2018 01:37:38 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: david@fromorbit.com, sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, Dave Chinner , linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: Re: [PATCH 24/26] xfs: fix pagecache truncation prior to reflink Message-ID: <20181017083738.GH16896@infradead.org> References: <153965939489.1256.7400115244528045860.stgit@magnolia> <153966004854.3607.15187709452762502392.stgit@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <153966004854.3607.15187709452762502392.stgit@magnolia> Sender: owner-linux-mm@kvack.org List-ID: On Mon, Oct 15, 2018 at 08:20:48PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong > > Prior to remapping blocks, it is necessary to remove pages from the > destination file's page cache. Unfortunately, the truncation is not > aggressive enough -- if page size > block size, we'll end up zeroing > subpage blocks instead of removing them. So, round the start offset > down and the end offset up to page boundaries. We already wrote all > the dirty data so the larger range shouldn't be a problem. > > Signed-off-by: Darrick J. Wong > Reviewed-by: Dave Chinner Looks fine, Reviewed-by: Christoph Hellwig