From patchwork Sat Nov 10 11:51:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10677103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DC4E139B for ; Sat, 10 Nov 2018 11:52:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CB2D2CF08 for ; Sat, 10 Nov 2018 11:52:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00C432CF6E; Sat, 10 Nov 2018 11:52:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E682A2CF08 for ; Sat, 10 Nov 2018 11:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729064AbeKJVgu (ORCPT ); Sat, 10 Nov 2018 16:36:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35942 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbeKJVgt (ORCPT ); Sat, 10 Nov 2018 16:36:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+q3tJzwm+wKdh5f2q+S2mknXBGmZdAyIaQEPmpeWywU=; b=SEacM9KCpUHTMu3AMn62n843vg m0l6OzXEk/RRFB8tvBYFnGk2xRl1YaPu8ipGrX4VxIKedRccztqfCGjB1+CqpFa2cDbx+Lt/MgBZN q9of11G3/dK4qpCzaudpENcf0dbfrClmEZ5vfJnyH88nXCvWLYa2siqL7TgTwdMwbsjG/jU+C3fR6 XzUskUXZRJeFiI8tRvv+16eJCPR3suRMQTrvNsAqTgkwKZa7L20IaW9GbnICpz5GEtay8UbrNVd4H H4A4/OeDZZq3kAul4SQ3gX/OgV9ytyhXKZ+c3TO9ncjYMNudfmjZp5Z39DPri7sM8imsFher+nzVL uePYRHPw==; Received: from 089144211136.atnat0020.highway.a1.net ([89.144.211.136] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLRo3-0000eN-NI; Sat, 10 Nov 2018 11:52:04 +0000 From: Christoph Hellwig To: guaneryu@gmail.com Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 5/5] xfs/420: only check the extent layout after syncing Date: Sat, 10 Nov 2018 12:51:45 +0100 Message-Id: <20181110115145.30356-6-hch@lst.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181110115145.30356-1-hch@lst.de> References: <20181110115145.30356-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This tests validates the correct extent layout for some hairy reflink related issues. But until we called sync or fsync we have no gurantee of any data fork layout, as only writeback moves the extents from the COW for to the data fork. Without this we'll see an error if we use COW fork speculative preallocations for non-overwrites, which is useful to reduce fragmentation. Signed-off-by: Christoph Hellwig --- tests/xfs/420 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/xfs/420 b/tests/xfs/420 index a083a12b..aea95c7b 100755 --- a/tests/xfs/420 +++ b/tests/xfs/420 @@ -93,6 +93,8 @@ $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file2 >> $seqres $XFS_IO_PROG -c "pwrite -S 0x63 0 $blksz" $testdir/file3 >> $seqres.full $XFS_IO_PROG -c "pwrite -S 0x63 $((blksz * 3)) $blksz" $testdir/file3 >> $seqres.full +sync + $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file1 >> $seqres.full 2>&1 $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file2 >> $seqres.full 2>&1 $XFS_IO_PROG -c "bmap -ev" -c "bmap -cv" $testdir/file3 >> $seqres.full 2>&1