From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:32788 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932533AbeCMOgc (ORCPT ); Tue, 13 Mar 2018 10:36:32 -0400 Received: from 77.117.139.172.wireless.dyn.drei.com ([77.117.139.172] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1evl2W-0004dW-0V for linux-xfs@vger.kernel.org; Tue, 13 Mar 2018 14:36:32 +0000 From: Christoph Hellwig Subject: [PATCH 8/8] xfs: only clear preallocated COW blocks in xfs_reflink_clear_inode_flag Date: Tue, 13 Mar 2018 15:36:01 +0100 Message-Id: <20180313143601.30028-9-hch@lst.de> In-Reply-To: <20180313143601.30028-1-hch@lst.de> References: <20180313143601.30028-1-hch@lst.de> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: linux-xfs@vger.kernel.org Currently these are the only ones that should exist at this point anyway, but with O_ATOMIC writes we might have legit extents around in the COW fork even when clearing the reflink flag. Signed-off-by: Christoph Hellwig --- fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 85d3379a81df..8ab9c73b430e 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -1570,7 +1570,7 @@ xfs_reflink_clear_inode_flag( * We didn't find any shared blocks so turn off the reflink flag. * First, get rid of any leftover CoW mappings. */ - error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, true); + error = xfs_reflink_cancel_cow_blocks(ip, tpp, 0, NULLFILEOFF, false); if (error) return error; -- 2.14.2