From patchwork Tue Dec 14 08:18:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB03BC43217 for ; Tue, 14 Dec 2021 08:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231789AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231793AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 IronPort-Data: A9a23:wf0ql6xjvI1g5eNBizJ6t+cexCrEfRIJ4+MujC/XYbTApDshgj1WmzNLCGDXaPqJYzPxc9ggbY61p0lV7ZLXyIU2HQtv/xmBbVoQ95OdWo7xwmQcns+qBpSaChohtq3yU/GYRCwPZiKa9kfF3oTJ9yEmjPjSH+akUYYoBwgqLeNaYHZ44f5cs75h6mJYqYDR7zKl4bsekeWGULOW82Ic3lYv1k62gEgHUMIeF98vlgdWifhj5DcynpSOZX4VDfnZw3DQGuG4EgMmLtsvwo1V/kuBl/ssItij1LjmcEwWWaOUNg+L4pZUc/H6xEEc+WppieBmXBYfQR4/ZzGhhc14zs5c85K2UhsBMLDOmfgGTl9TFCQW0ahuoeaXcSfv7ZHCp6HBWz62qxl0N2k6P5If/OlfAmxU8/EcbjcXYXirifmqzamnUcFyick5asrmJoUSvjdn1z6xMBqMafgvWI2TvZkBgmh23ZsIQJ7jiwMiQWIHRHz9j9dnZz/70K4Dodo= IronPort-HdrOrdr: A9a23:W2KkWK8nxZIJM9aSEJduk+DkI+orL9Y04lQ7vn2ZKCYlFvBw8vrCoB1173HJYUkqMk3I9ergBEDiewK4yXcW2/hzAV7KZmCP11dAR7sSj7cKrQeBJwTOssZZ1YpFN5N1EcDMCzFB5vrS0U2VFMkBzbC8nJyVuQ== X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878459" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 7AAF54D144C2; Tue, 14 Dec 2021 16:19:18 +0800 (CST) Received: from G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:18 +0800 Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:18 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:16 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 01/17] generic: add mmap CoW test for ranges of two shared files Date: Tue, 14 Dec 2021 16:18:58 +0800 Message-ID: <20211214081914.2478122-2-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 7AAF54D144C2.A0DA6 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents. (MMAP version of generic/185,183) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/900 | 69 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/900.out | 14 +++++++++ 2 files changed, 83 insertions(+) create mode 100755 tests/generic/900 create mode 100644 tests/generic/900.out diff --git a/tests/generic/900 b/tests/generic/900 new file mode 100755 index 00000000..de76cd00 --- /dev/null +++ b/tests/generic/900 @@ -0,0 +1,69 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 900 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents. (MMAP version of generic/185,183) +# - Create two files +# - Reflink the odd blocks of the first file into a third file. +# - Reflink the even blocks of the second file into the third file. +# - mmap CoW across the halfway mark. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full +_pwrite_byte 0x62 0 $filesize $testdir/file2 >> $seqres.full +seq 0 2 $((nr-1)) | while read f; do + _reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full + _pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full +done +seq 1 2 $((nr-1)) | while read f; do + _reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full + _pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full +done +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file2 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file2 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/900.out b/tests/generic/900.out new file mode 100644 index 00000000..b2569ab0 --- /dev/null +++ b/tests/generic/900.out @@ -0,0 +1,14 @@ +QA output created by 900 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-900/file1 +b83f9394092e15bdcda585cd8e776dc6 SCRATCH_MNT/test-900/file2 +d3959a68638c50af07f0258e032cb554 SCRATCH_MNT/test-900/file3 +d3959a68638c50af07f0258e032cb554 SCRATCH_MNT/test-900/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-900/file1 +b83f9394092e15bdcda585cd8e776dc6 SCRATCH_MNT/test-900/file2 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-900/file3 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-900/file3.chk From patchwork Tue Dec 14 08:18:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B8D0C433EF for ; Tue, 14 Dec 2021 08:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:65312 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231789AbhLNITX (ORCPT ); Tue, 14 Dec 2021 03:19:23 -0500 IronPort-Data: A9a23:wMp4aK09sqFlmz49oPbD5fpzkn2cJEfYwER7XOPLsXnJgWt2hjUPzGIZD2CCOavbMWv0ftsiPo628E4HuZXRyNE2QQE+nZ1PZygU8JKaX7x1DatR0xu6d5SFFAQ+hyknQoGowPscEzmM9n9BDpC79SMljPvRGuKlYAL5EnsZqTFMGX5JZS1Ly7ZRbr5A2bBVMivV0T/Ai5S31GyNh1aYBlkpB5er83uDihhdVAQw5TTSbdgT1LPXeuJ84Jg3fcldJFOgKmVY83LTegrN8F251juxExYFAdXjnKv5c1ERX/jZOg3mZnh+AvDk20Yd4HdplPtT2Pk0MC+7jx2Tgtl308QLu5qrVS8nI6/NhP8AFRJfFkmSOIUfoe+Xfijj7JP7I0ruNiGEL+9VJE00Iooe9c50DHtI+PheLyoCBjiNnP67266gYvdji95lL8TxOo4b/HZ6wlnk4VwOKXzYa/ySo4YGg3Fr3YYTdcsyrvExMVJHBCksqTUSUrvPNK8DoQ== IronPort-HdrOrdr: A9a23:Oji5l6FLgCsvo1kRpLqE1MeALOsnbusQ8zAXPiFKOHhom6mj+vxG88506faKslwssR0b+OxoW5PwJE80l6QFgrX5VI3KNGbbUQCTXeNfBOXZowHIKmnX8+5x8eNaebFiNduYNzNHpPe/zA6mM9tI+rW6zJw= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878457" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id 956E14D144C3; Tue, 14 Dec 2021 16:19:18 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:19 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:16 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 02/17] generic: add mmap CoW test for regular&destination extents Date: Tue, 14 Dec 2021 16:18:59 +0800 Message-ID: <20211214081914.2478122-3-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 956E14D144C3.A0395 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, some regular, some not. (MMAP version of generic/197,196) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/901 | 59 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/901.out | 12 +++++++++ 2 files changed, 71 insertions(+) create mode 100755 tests/generic/901 create mode 100644 tests/generic/901.out diff --git a/tests/generic/901 b/tests/generic/901 new file mode 100755 index 00000000..b9f4fbc0 --- /dev/null +++ b/tests/generic/901 @@ -0,0 +1,59 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 901 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, some regular, some not. +# (MMAP version of generic/197,196) +# - Create two files. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/901.out b/tests/generic/901.out new file mode 100644 index 00000000..c3983e87 --- /dev/null +++ b/tests/generic/901.out @@ -0,0 +1,12 @@ +QA output created by 901 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-901/file1 +d3959a68638c50af07f0258e032cb554 SCRATCH_MNT/test-901/file3 +d3959a68638c50af07f0258e032cb554 SCRATCH_MNT/test-901/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-901/file1 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-901/file3 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-901/file3.chk From patchwork Tue Dec 14 08:19:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5014FC433F5 for ; Tue, 14 Dec 2021 08:19:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231790AbhLNITW (ORCPT ); Tue, 14 Dec 2021 03:19:22 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:12969 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231789AbhLNITW (ORCPT ); Tue, 14 Dec 2021 03:19:22 -0500 IronPort-Data: A9a23:wKvBzaArnCGOBxVW/wDhw5YqxClBgxIJ4g17XOLfVwC51jIl0zwGnGIXCGrQMv3ca2Kge9x2PYTn808OuZWAx9UxeLYW3SszFioV86IpJjg4wn/YZnrUdouaJK5ex512huLocYZkHhcwmj/3auK49CMlifnRLlbBILWs1h5ZFFYMpBgJ2UoLd94R2uaEsPDha++/kYqaT/73ZDdJ7wVJ3lc8sMpvnv/AUMPa41v0tnRmDRxCUcS3e3M9VPrzLonpR5f0rxU9IwK0ewrD5OnREmLx9BFrBM6nk6rgbwsBRbu60Qqm0yIQAvb9xEMZ4HFaPqUTbZLwbW9NljyPhME3xtNWqbS+VAUoIrbR3u8aVnG0FgknZP0Wp++bfCXXXcu7iheun2HX6/lsE0YwMqUb9/xxDGUI8uYXQBgDdQyOnP6t6Ky0R/Mqhck5KsTveoQFtRldIZvxZRo9acmbBfyUupkDh3Ft7v2i1M32P6IxAQeDpjyZC/GXBmoqNQ== IronPort-HdrOrdr: A9a23:SGeBvKqUCur+o3POnHpH2G4aV5oXeYIsimQD101hICG9E/bo8/xG+c536faaslgssQ4b8+xoVJPgfZq+z+8R3WByB8bAYOCOggLBQ72KhrGSoQEIdRefysdtkY9kc4VbTOb7FEVGi6/BizWQIpINx8am/cmT6dvj8w== X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878455" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 04E464D144C4; Tue, 14 Dec 2021 16:19:19 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:17 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:17 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 03/17] generic: add mmap CoW test for unwritten&destination extents Date: Tue, 14 Dec 2021 16:19:00 +0800 Message-ID: <20211214081914.2478122-4-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 04E464D144C4.A3BC8 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, some unwritten, some not. (MMAP version of generic/189,188) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/902 | 59 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/902.out | 12 +++++++++ 2 files changed, 71 insertions(+) create mode 100755 tests/generic/902 create mode 100644 tests/generic/902.out diff --git a/tests/generic/902 b/tests/generic/902 new file mode 100755 index 00000000..457b039a --- /dev/null +++ b/tests/generic/902 @@ -0,0 +1,59 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 902 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, some unwritten, some not. +# (MMAP version of generic/189,188) +# - Create a file and fallocate a second file. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/902.out b/tests/generic/902.out new file mode 100644 index 00000000..bc951255 --- /dev/null +++ b/tests/generic/902.out @@ -0,0 +1,12 @@ +QA output created by 902 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-902/file1 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-902/file3 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-902/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-902/file1 +09101629908f9bdd5d178e7ce20bb1bb SCRATCH_MNT/test-902/file3 +09101629908f9bdd5d178e7ce20bb1bb SCRATCH_MNT/test-902/file3.chk From patchwork Tue Dec 14 08:19:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675579 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C73C9C433EF for ; Tue, 14 Dec 2021 08:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231800AbhLNITZ (ORCPT ); Tue, 14 Dec 2021 03:19:25 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231797AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 IronPort-Data: A9a23:HXDfX6Jxkn0zWATAFE+R+JclxSXFcZb7ZxGrkP8bfHCw0j8k0GABmGceWT/TP/mLYjT1L4t2a9izo0pTucLUyYNqS1BcGVNFFSwT8ZWfbTi6wuYcBwvLd4ubChsPA/w2MrEsF+hpCC+MzvuRGuK59yAlj/jUHuOU5NPsYUideyc1EU/Ntjozw4bVsqYw6TSIK1vlVeHa+qUzC3f5s9JACV/43orYwP9ZUFsejxtD1rA2TagjUFYzDBD5BrpHTU26ByOQroW5goeHq+j/ILGRpgs1/j8mDJWrj7T6blYXBLXVOGBiiFIPA+773EcE/Xd0j87XN9JFAatToy+UltZq2ZNDs4esYQk0PKzQg/lbWB5de817FfQfqO+YcSTh66R/yGWDKRMA2c5GAEMpOosX0uV6G2dD8bofMj9lRh6Ym++t3KmTVOZhnIIgIdPtMYdZvWtvpQw1p95OrYvrGv2MvIEHmmxrwJ0mIBoXXOJBARIHUfgKS0Mn1o8rNa8D IronPort-HdrOrdr: A9a23:rpQykK3LKFjTlf2tStxvuAqjBI4kLtp133Aq2lEZdPU1SL39qynKppkmPHDP5gr5J0tLpTntAsi9qBDnhPtICOsqTNSftWDd0QPGEGgI1/qB/9SPIU3D398Y/aJhXow7M9foEGV95PyQ3CCIV/om3/mLmZrFudvj X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878462" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 5F6EA4D144C5; Tue, 14 Dec 2021 16:19:19 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:19 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:17 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 04/17] generic: add mmap CoW test for holes&destination extents Date: Tue, 14 Dec 2021 16:19:01 +0800 Message-ID: <20211214081914.2478122-5-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 5F6EA4D144C5.A22EA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, some holes, some not. (MMAP version of generic/191,190) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/903 | 59 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/903.out | 12 +++++++++ 2 files changed, 71 insertions(+) create mode 100755 tests/generic/903 create mode 100644 tests/generic/903.out diff --git a/tests/generic/903 b/tests/generic/903 new file mode 100755 index 00000000..d0de3f26 --- /dev/null +++ b/tests/generic/903 @@ -0,0 +1,59 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 903 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, some holes, some not. +# (MMAP version of generic/191,190) +# - Create a file and truncate a second file. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/903.out b/tests/generic/903.out new file mode 100644 index 00000000..bf57acc7 --- /dev/null +++ b/tests/generic/903.out @@ -0,0 +1,12 @@ +QA output created by 903 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-903/file1 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-903/file3 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-903/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-903/file1 +09101629908f9bdd5d178e7ce20bb1bb SCRATCH_MNT/test-903/file3 +09101629908f9bdd5d178e7ce20bb1bb SCRATCH_MNT/test-903/file3.chk From patchwork Tue Dec 14 08:19:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22F5DC433FE for ; Tue, 14 Dec 2021 08:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231797AbhLNITZ (ORCPT ); Tue, 14 Dec 2021 03:19:25 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:65312 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229565AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 IronPort-Data: A9a23:QNkm8al/0Bco0WfbR4s+1yLo5gydJERdPkR7XQ2eYbTBsI5bpzIAyWRKD2GCaf3eajajfop3OYvg/EIP78WEytFkQAJt+CA2RRqmi+KfW43BcR2Y0wB+jyH7ZBs+qZ1YM7EsFehsJpPnjkrrYuiJQUVUj/nSH+OmUbKcY0ideCc/IMsfoUM68wIGqt4w6TSJK1vlVeLa+6UzCnf8s9JHGj58B5a4lf9alK+aVAX0EbAJTasjUFf2zxH5BX+ETE27ByOQroJ8RoZWSwtfpYxV8F81/z91Yj+kur39NEMXQL/OJhXIgX1TM0SgqkEa4HVsjeBgb7xBAatUo2zhc9RZ0shEs4ehDwkvJbHklvkfUgVDDmd1OqguFLrveCHv4ZPDkxOfG5fr67A0ZK0sBqUW4fp6Gn1V3eIXJSpLbR2Zge+yhrWhRYFRam4LRCXwFNpH/Cg+kneCVrB7Ka0vip7ivbdwtArcTOgQdRoGW/ckVA== IronPort-HdrOrdr: A9a23:9wNOdKgRjn/yhTKEZ/PDfiqIl3BQXuYji2hC6mlwRA09TyX4rbHLoB1/73LJYVkqNk3I5urrBEDtexLhHP1OkOws1NWZLWrbUQKTRekM0WKI+UyDJ8SRzI5g/JYlW61/Jfm1NlJikPv9iTPSL/8QhPWB74Ck7N2z80tQ X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878461" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id AEE2F4D144C6 for ; Tue, 14 Dec 2021 16:19:19 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:19 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:17 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 05/17] common/rc: Introduce _require_scratch_delalloc() Date: Tue, 14 Dec 2021 16:19:02 +0800 Message-ID: <20211214081914.2478122-6-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: AEE2F4D144C6.A3382 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Check whether delalloc is supported on current device. Signed-off-by: Shiyang Ruan --- common/rc | 13 +++++++++++++ tests/generic/194 | 1 + tests/generic/195 | 1 + tests/generic/199 | 1 + tests/generic/200 | 1 + tests/generic/293 | 1 + tests/generic/295 | 1 + tests/generic/540 | 1 + tests/generic/541 | 1 + tests/generic/542 | 1 + tests/generic/543 | 1 + tests/xfs/172 | 12 +----------- tests/xfs/223 | 1 + tests/xfs/224 | 1 + tests/xfs/228 | 1 + tests/xfs/230 | 1 + tests/xfs/257 | 1 + tests/xfs/258 | 1 + 18 files changed, 30 insertions(+), 11 deletions(-) diff --git a/common/rc b/common/rc index 7973ceb5..a419b3ba 100644 --- a/common/rc +++ b/common/rc @@ -1748,6 +1748,19 @@ _require_scratch_16T_support() esac } +# Require scratch fs supports delay allocation. +_require_scratch_delalloc() +{ + _require_command "$FILEFRAG_PROG" filefrag + + _scratch_mkfs > $seqres.full + _scratch_mount + $XFS_IO_PROG -f -c 'pwrite 0 64k' $SCRATCH_MNT/testy &> /dev/null + $FILEFRAG_PROG -v $SCRATCH_MNT/testy 2>&1 | grep -q delalloc || \ + _notrun "test requires delayed allocation buffered writes" + _scratch_unmount +} + # this test needs a test partition - check we're ok & mount it # _require_test() diff --git a/tests/generic/194 b/tests/generic/194 index ce8c31ac..ff76438d 100755 --- a/tests/generic/194 +++ b/tests/generic/194 @@ -28,6 +28,7 @@ _cleanup() # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_odirect diff --git a/tests/generic/195 b/tests/generic/195 index da502c39..e087b99c 100755 --- a/tests/generic/195 +++ b/tests/generic/195 @@ -28,6 +28,7 @@ _cleanup() # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/generic/199 b/tests/generic/199 index ab13f58e..2a8cafcc 100755 --- a/tests/generic/199 +++ b/tests/generic/199 @@ -31,6 +31,7 @@ _cleanup() # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_cp_reflink diff --git a/tests/generic/200 b/tests/generic/200 index deadfeaa..a1a78ef4 100755 --- a/tests/generic/200 +++ b/tests/generic/200 @@ -31,6 +31,7 @@ _cleanup() # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "fpunch" _require_cp_reflink diff --git a/tests/generic/293 b/tests/generic/293 index 74231b4d..0f1d8416 100755 --- a/tests/generic/293 +++ b/tests/generic/293 @@ -24,6 +24,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/generic/295 b/tests/generic/295 index b921c79b..f66c1805 100755 --- a/tests/generic/295 +++ b/tests/generic/295 @@ -24,6 +24,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_odirect diff --git a/tests/generic/540 b/tests/generic/540 index 69cf635f..38e00f97 100755 --- a/tests/generic/540 +++ b/tests/generic/540 @@ -26,6 +26,7 @@ _begin_fstest auto quick clone # real QA test starts here _supported_fs generic _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/generic/541 b/tests/generic/541 index 925f346e..89b2adad 100755 --- a/tests/generic/541 +++ b/tests/generic/541 @@ -26,6 +26,7 @@ _begin_fstest auto quick clone # real QA test starts here _supported_fs generic _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/generic/542 b/tests/generic/542 index e3e627a8..e7682f59 100755 --- a/tests/generic/542 +++ b/tests/generic/542 @@ -26,6 +26,7 @@ _begin_fstest auto quick clone # real QA test starts here _supported_fs generic _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/generic/543 b/tests/generic/543 index 047bedd5..624cfc41 100755 --- a/tests/generic/543 +++ b/tests/generic/543 @@ -26,6 +26,7 @@ _begin_fstest auto quick clone # real QA test starts here _supported_fs generic _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" echo "Format and mount" diff --git a/tests/xfs/172 b/tests/xfs/172 index c0495305..56c2583b 100755 --- a/tests/xfs/172 +++ b/tests/xfs/172 @@ -16,7 +16,6 @@ _begin_fstest rw filestreams # real QA test starts here _supported_fs xfs -_require_command "$FILEFRAG_PROG" filefrag _require_scratch # The first _test_streams call sets up the filestreams allocator to fail and @@ -36,16 +35,7 @@ _require_scratch # rescan thresholds and will keep pushing out the expiration time, with the # result that the filestreams allocator succeeds in maintaining the streams. # The test considers this a failure. -# -# Make sure that a regular buffered write produces delalloc reservations. -# This effectively disables the test for files with extent size hints or DAX -# mode set. -_scratch_mkfs > $seqres.full -_scratch_mount -$XFS_IO_PROG -f -c 'pwrite 0 64k' $SCRATCH_MNT/testy &> /dev/null -$FILEFRAG_PROG -v $SCRATCH_MNT/testy 2>&1 | grep -q delalloc || \ - _notrun "test requires delayed allocation buffered writes" -_scratch_unmount +_require_scratch_delalloc _check_filestreams_support || _notrun "filestreams not available" diff --git a/tests/xfs/223 b/tests/xfs/223 index f002f1de..11dbad14 100755 --- a/tests/xfs/223 +++ b/tests/xfs/223 @@ -22,6 +22,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" _require_odirect diff --git a/tests/xfs/224 b/tests/xfs/224 index 11a54fa3..f8bab07e 100755 --- a/tests/xfs/224 +++ b/tests/xfs/224 @@ -22,6 +22,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" diff --git a/tests/xfs/228 b/tests/xfs/228 index 5c644c0f..f2f2f6a9 100755 --- a/tests/xfs/228 +++ b/tests/xfs/228 @@ -25,6 +25,7 @@ _begin_fstest auto quick clone punch # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" _require_xfs_io_command "fpunch" diff --git a/tests/xfs/230 b/tests/xfs/230 index 53e8dd78..15f6b684 100755 --- a/tests/xfs/230 +++ b/tests/xfs/230 @@ -25,6 +25,7 @@ _begin_fstest auto quick clone punch # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" _require_xfs_io_command "fpunch" diff --git a/tests/xfs/257 b/tests/xfs/257 index acd55c22..6a58f0ac 100755 --- a/tests/xfs/257 +++ b/tests/xfs/257 @@ -25,6 +25,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" diff --git a/tests/xfs/258 b/tests/xfs/258 index 25e8eb60..2865cdf9 100755 --- a/tests/xfs/258 +++ b/tests/xfs/258 @@ -25,6 +25,7 @@ _begin_fstest auto quick clone # real QA test starts here _require_scratch_reflink +_require_scratch_delalloc _require_xfs_io_command "falloc" _require_xfs_io_command "cowextsize" _require_odirect From patchwork Tue Dec 14 08:19:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D123C4321E for ; Tue, 14 Dec 2021 08:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231799AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:12969 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231795AbhLNITY (ORCPT ); Tue, 14 Dec 2021 03:19:24 -0500 IronPort-Data: A9a23:ZxOGv6CkGP9WgRVW/zXhw5YqxClBgxIJ4g17XOLfAQew0mgghWABmmEbCGmDbPrYN2v0fNgnOdzjox8AucOAx9UxeLYW3SszFioV86IpJjg4wn/YZnrUdouaJK5ex512huLocYZkHhcwmj/3auK49CMlifnRLlbBILWs1h5ZFFYMpBgJ2UoLd94R2uaEsPDha++/kYqaT/73ZDdJ7wVJ3lc8sMpvnv/AUMPa41v0tnRmDRxCUcS3e3M9VPrzLonpR5f0rxU9IwK0ewrD5OnREmLx9BFrBM6nk6rgbwsBRbu60Qqm0yIQAvb9xEMZ4HFaPqUTbZLwbW9NljyPhME3xtNWqbS+VAUoIrbR3u8aVnG0FgknZP0Wp++bfyDXXcu7iheun2HX6/t1EEwtIZYw5Ol6GydN+OYeJTRLaQqM799aaprTpvJE35xldZe0ethE/CwI8N0QNt5+KbirfkkAzYEwMO8Mu/1z IronPort-HdrOrdr: A9a23:moYVr6k1dw1eUQzXaYHe4dEk65TpDfIQ3DAbv31ZSRFFG/Fw9vre+MjzsCWYtN9/Yh8dcK+7UpVoLUm8yXcX2/h1AV7BZniEhILAFugLgrcKqAeQeREWmNQ86Y5QN4B6CPDVSWNxlNvG5mCDeOoI8Z2q97+JiI7lo0tQcQ== X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878460" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 3D86E4D144C7 for ; Tue, 14 Dec 2021 16:19:20 +0800 (CST) Received: from G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:18 +0800 Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:19 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:18 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 06/17] generic: add mmap CoW test for delalloc&destination extents Date: Tue, 14 Dec 2021 16:19:03 +0800 Message-ID: <20211214081914.2478122-7-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 3D86E4D144C7.A1025 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, some delalloc, some not. (MMAP version of generic/195,194) Signed-off-by: Shiyang Ruan --- tests/generic/904 | 62 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/904.out | 12 +++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/generic/904 create mode 100644 tests/generic/904.out diff --git a/tests/generic/904 b/tests/generic/904 new file mode 100755 index 00000000..428dbbf4 --- /dev/null +++ b/tests/generic/904 @@ -0,0 +1,62 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 904 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, some delalloc, some not. +# (MMAP version of generic/195,194) +# - Create a file. +# - Reflink the odd blocks of the first file into the second file. +# - Buffered write the even blocks of the second file. +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/904.out b/tests/generic/904.out new file mode 100644 index 00000000..cc993394 --- /dev/null +++ b/tests/generic/904.out @@ -0,0 +1,12 @@ +QA output created by 904 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-904/file1 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-904/file3 +fa50dba51826899c372464a153cb2117 SCRATCH_MNT/test-904/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-904/file1 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-904/file3 +55968a95dfc0120df4e8485576514320 SCRATCH_MNT/test-904/file3.chk From patchwork Tue Dec 14 08:19:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30CB8C433FE for ; Tue, 14 Dec 2021 08:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbhLNITX (ORCPT ); Tue, 14 Dec 2021 03:19:23 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:12969 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229565AbhLNITX (ORCPT ); Tue, 14 Dec 2021 03:19:23 -0500 IronPort-Data: A9a23:zTG8Aa3Vt4bkU/2IlvbD5c9zkn2cJEfYwER7XOPLsXnJgDIj1WMGyGpNDDrVa/3bYDDwKd90Pt+x8EgEvZHVmIM2QQE+nZ1PZygU8JKaX7x1DatR0xu6d5SFFAQ+hyknQoGowPscEzmM9n9BDpC79SMljPvRGuKlYAL5EnsZqTFMGX5JZS1Ly7ZRbr5A2bBVMivV0T/Ai5S31GyNh1aYBlkpB5er83uDihhdVAQw5TTSbdgT1LPXeuJ84Jg3fcldJFOgKmVY83LTegrN8F251juxExYFAdXjnKv5c1ERX/jZOg3mZnh+AvDk20Yd4HdplPtT2Pk0MC+7jx2Tgtl308QLu5qrVS8nI6/NhP8AFRJfFkmSOIUfoe+Xfijj7Jz7I0ruNiGEL+9VJE8tIYAD5v1fH25D77obJSoLYxTFgPi5qI9X4MEEat8LdZGtZd1A/Co7i2yxMBrveribK42i2DOS9GpYahhyIMvj IronPort-HdrOrdr: A9a23:zMurNKvrNi4Ep5sKJXLRuF/p7skDStV00zEX/kB9WHVpm62j5qSTdZEguCMc5wx+ZJheo7q90cW7IE80lqQFhLX5X43SPzUO0VHARO5fBODZsl/d8kPFltJ15ONJdqhSLJnKB0FmsMCS2mKFOudl7N6Z0K3Av4vj80s= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878458" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id 56B814D144C8 for ; Tue, 14 Dec 2021 16:19:20 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:21 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:18 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 07/17] generic: add mmap CoW test for mixed&destination extents Date: Tue, 14 Dec 2021 16:19:04 +0800 Message-ID: <20211214081914.2478122-8-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 56B814D144C8.AEF87 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, mixed with reflinked, unwritten, hole, regular and delalloc blocks. (MMAP version of generic/200,199) Signed-off-by: Shiyang Ruan --- tests/generic/905 | 67 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/905.out | 12 ++++++++ 2 files changed, 79 insertions(+) create mode 100755 tests/generic/905 create mode 100644 tests/generic/905.out diff --git a/tests/generic/905 b/tests/generic/905 new file mode 100755 index 00000000..8178f630 --- /dev/null +++ b/tests/generic/905 @@ -0,0 +1,67 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 905 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, mixed with reflinked, unwritten, +# hole, regular and delalloc blocks. +# (MMAP version of generic/200,199) +# - Create a file with the following repeating sequence of blocks: +# 1. reflinked +# 2. unwritten +# 3. hole +# 4. regular block +# 5. delalloc +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone punch + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" +_require_xfs_io_command "fpunch" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full +# now cow +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file3.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file3.chk | _filter_scratch + +# success, all done +status=0 diff --git a/tests/generic/905.out b/tests/generic/905.out new file mode 100644 index 00000000..6fb0be5f --- /dev/null +++ b/tests/generic/905.out @@ -0,0 +1,12 @@ +QA output created by 905 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-905/file1 +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-905/file3 +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-905/file3.chk +mmap CoW across the transition +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-905/file1 +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-905/file3 +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-905/file3.chk From patchwork Tue Dec 14 08:19:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8730CC4332F for ; Tue, 14 Dec 2021 08:19:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231791AbhLNITX (ORCPT ); Tue, 14 Dec 2021 03:19:23 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:65312 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231796AbhLNITW (ORCPT ); Tue, 14 Dec 2021 03:19:22 -0500 IronPort-Data: A9a23:S9zFhK3fzNyO9gaNvPbD5fpzkn2cJEfYwER7XOPLsXnJgj0m0zMBymdLCzyOb6yNM2f2eNElbIS08kIFv5Hczdc2QQE+nZ1PZygU8JKaX7x1DatR0xu6d5SFFAQ+hyknQoGowPscEzmM9n9BDpC79SMljPvRGuKlYAL5EnsZqTFMGX5JZS1Ly7ZRbr5A2bBVMivV0T/Ai5S31GyNh1aYBlkpB5er83uDihhdVAQw5TTSbdgT1LPXeuJ84Jg3fcldJFOgKmVY83LTegrN8F251juxExYFAdXjnKv5c1ERX/jZOg3mZnh+AvDk20Yd4HdplPtT2Pk0MC+7jx2Tgtl308QLu5qrVS8nI6/NhP8AFRJfFkmSOIUfoe+Xfijj7JL7I0ruNiGEL+9VJE00Iooe9c50DHtI+PheLyoCBjiNnP67266gYvdji95lL8TxOo4b/HZ6wlnk4VwOKXzYa/ySo4YGg3Fr3YYTdcsyrvExMVJHBCksqTUSUrvPNK8DoQ== IronPort-HdrOrdr: A9a23:zXxmDKwsyzWdh0NyXt6qKrPwEL1zdoMgy1knxilNoH1uA6ilfqWV8cjzuiWbtN9vYhsdcLy7WZVoIkmskKKdg7NhXotKNTOO0ASVxepZnOnfKlPbexHWx6p00KdMV+xEAsTsMF4St63HyTj9P9E+4NTvysyVuds= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878456" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id AF64A4D144C9; Tue, 14 Dec 2021 16:19:20 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:19 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:18 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 08/17] generic: add mmap CoW test for regular&source extents Date: Tue, 14 Dec 2021 16:19:05 +0800 Message-ID: <20211214081914.2478122-9-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: AF64A4D144C9.A025D X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode to the source file when the CoW range covers regular unshared and regular shared blocks. (MMAP version of generic/284,287) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/906 | 60 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/906.out | 12 +++++++++ 2 files changed, 72 insertions(+) create mode 100755 tests/generic/906 create mode 100644 tests/generic/906.out diff --git a/tests/generic/906 b/tests/generic/906 new file mode 100755 index 00000000..953348e8 --- /dev/null +++ b/tests/generic/906 @@ -0,0 +1,60 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 906 +# +# Ensuring that copy on write in mmap mode to the source file when the +# CoW range covers regular unshared and regular shared blocks. +# (MMAP version of generic/284,287) +# - Create two files. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW the first file across the halfway mark, starting with the +# regular extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/906.out b/tests/generic/906.out new file mode 100644 index 00000000..4949769b --- /dev/null +++ b/tests/generic/906.out @@ -0,0 +1,12 @@ +QA output created by 906 +Format and mount +Create the original files +Compare files +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-906/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-906/file3 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-906/file1.chk +mmap CoW across the transition +Compare files +2dc2b131303b2f70ddb480778caac8b7 SCRATCH_MNT/test-906/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-906/file3 +2dc2b131303b2f70ddb480778caac8b7 SCRATCH_MNT/test-906/file1.chk From patchwork Tue Dec 14 08:19:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72718C4332F for ; Tue, 14 Dec 2021 08:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231793AbhLNIT0 (ORCPT ); Tue, 14 Dec 2021 03:19:26 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231795AbhLNITZ (ORCPT ); Tue, 14 Dec 2021 03:19:25 -0500 IronPort-Data: A9a23:IenkLqrAgObxFSzZtxgHt2cocppeBmIxZxIvgKrLsJaIsI5as4F+vjRJCDiBaPqKZmSjL95xPY+x/RkO65HdydZkTlQ+qy5jQiMRo6IpJ/zDcB6oYHn6wu4v7a5fx5xHLIGGdajYd1eEzvuWGuWn/SkUOZ2gHOKmUbeeY3wpHGeIdQ964f5ds79g6mJXqYjha++9kYuaT/z3YDdJ6RYtWo4nw/7rRCdUgRjHkGhwUmrSyhx8lAS2e3E9VPrzLEwqRpfyatE88uWSH44vwFwll1418SvBCvv9+lr6WkYMBLDPPwmSkWcQUK+n6vRAjnVqlP9la7xHMgEK49mKt4kZJNFlr4G5Txw4eKPKg/g1XQRaEj1lIOtN/7qvzX2X6JXDnxKWLyW3qxlpJARsVWECwc57A35J8/MwKz0XaB2HweWsz9qTRPJwi98/N+H1M44F/HJt1zfUCbAhW5+rfklgzbe0xx9p3oYXQ6mYPJFfNFJSgN37S0UnEj8q5FgWwI9EXkXCTgA= IronPort-HdrOrdr: A9a23:ouJUC6BuQYHue2vlHemQ55DYdb4zR+YMi2TDtnoBLSC9F/b0qynAppomPGDP4gr5NEtApTniAtjkfZq/z+8X3WB5B97LMzUO01HYTr2Kg7GD/xTQXwX69sN4kZxrarVCDrTLZmRSvILX5xaZHr8brOW6zA== X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878463" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:21 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 140E44D144DA; Tue, 14 Dec 2021 16:19:21 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:20 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:19 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 09/17] generic: add mmap CoW test for unwritten&source extents Date: Tue, 14 Dec 2021 16:19:06 +0800 Message-ID: <20211214081914.2478122-10-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 140E44D144DA.A37C9 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode to the source file when the CoW range covers unwritten and regular shared blocks. (MMAP version of generic/289,290) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/907 | 62 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/907.out | 12 +++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/generic/907 create mode 100644 tests/generic/907.out diff --git a/tests/generic/907 b/tests/generic/907 new file mode 100755 index 00000000..61c9293a --- /dev/null +++ b/tests/generic/907 @@ -0,0 +1,62 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 907 +# +# Ensuring that copy on write in mmap mode to the source file when the +# CoW range covers unwritten and regular shared blocks. +# (MMAP version of generic/289,290) +# - Create two files. +# - fallocate the first file. +# - Write the odd blocks of the first file. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW the first file across the halfway mark, starting with the +# regular extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/907.out b/tests/generic/907.out new file mode 100644 index 00000000..c18b849c --- /dev/null +++ b/tests/generic/907.out @@ -0,0 +1,12 @@ +QA output created by 907 +Format and mount +Create the original files +Compare files +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-907/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-907/file3 +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-907/file1.chk +mmap CoW across the transition +Compare files +e8cf59797f0b3758c8878c368bb4cf7e SCRATCH_MNT/test-907/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-907/file3 +e8cf59797f0b3758c8878c368bb4cf7e SCRATCH_MNT/test-907/file1.chk From patchwork Tue Dec 14 08:19:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675597 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53FE8C433EF for ; Tue, 14 Dec 2021 08:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231809AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:11436 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231812AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 IronPort-Data: A9a23:uGQirKoKBG1NmVU9M5Kktcc2G/JeBmIxZxIvgKrLsJaIsI5as4F+vjAaXT+GOP7ZZWKjf9EgO4639k0OsJ7WzdAxHldlq3syQiMRo6IpJ/zDcB6oYHn6wu4v7a5fx5xHLIGGdajYd1eEzvuWGuWn/SkUOZ2gHOKmUbeeY3wpHGeIdQ964f5ds79g6mJXqYjha++9kYuaT/z3YDdJ6RYtWo4nw/7rRCdUgRjHkGhwUmrSyhx8lAS2e3E9VPrzLEwqRpfyatE88uWSH44vwFwll1418SvBCvv9+lr6WkYMBLDPPwmSkWcQUK+n6vRAjnVqlP9la7xHMgEK49mKt4kZJNFlr4G5Txw4eKPKg/g1XQRaEj1lIOtN/7qvzX2X6JXDnxKWLyu0qxlpJARsVWECwc57A35J8/MwKz0XaB2HweWsz9qTRPJwi98/N+H1M44F/HJt1zfUCbAhW5+rfklgzbe0xx9p3oYXQ6mYPJFfNFJSgN37S0UnEj8q5FgWwY9EXkXCTgA= IronPort-HdrOrdr: A9a23:yKBZhag6YLzP9Ik4doTdPDJfK3BQXuYji2hC6mlwRA09TyX4rbHLoB1/73LJYVkqNk3I5urrBEDtexLhHP1OkOws1NWZLWrbUQKTRekM0WKI+UyDJ8SRzI5g/JYlW61/Jfm1NlJikPv9iTPSL/8QhPWB74Ck7N2z80tQ X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878480" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 70FE14D144A0; Tue, 14 Dec 2021 16:19:21 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:21 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:19 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 10/17] generic: add mmap CoW test for holes&source extents Date: Tue, 14 Dec 2021 16:19:07 +0800 Message-ID: <20211214081914.2478122-11-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 70FE14D144A0.AFE81 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode to the source file when the CoW range covers holes and regular shared blocks. (MMAP version of generic/291,292) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/908 | 62 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/908.out | 12 +++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/generic/908 create mode 100644 tests/generic/908.out diff --git a/tests/generic/908 b/tests/generic/908 new file mode 100755 index 00000000..ad8de699 --- /dev/null +++ b/tests/generic/908 @@ -0,0 +1,62 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 908 +# +# Ensuring that copy on write in mmap mode to the source file when the +# CoW range covers holes and regular shared blocks. +# (MMAP version of generic/291,292) +# - Create two files. +# - Truncate the first file. +# - Write the odd blocks of the first file. +# - Reflink the odd blocks of the first file into the second file. +# - mmap CoW the first file across the halfway mark, starting with the +# regular extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/908.out b/tests/generic/908.out new file mode 100644 index 00000000..c8c670ac --- /dev/null +++ b/tests/generic/908.out @@ -0,0 +1,12 @@ +QA output created by 908 +Format and mount +Create the original files +Compare files +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-908/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-908/file3 +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-908/file1.chk +mmap CoW across the transition +Compare files +e8cf59797f0b3758c8878c368bb4cf7e SCRATCH_MNT/test-908/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-908/file3 +e8cf59797f0b3758c8878c368bb4cf7e SCRATCH_MNT/test-908/file1.chk From patchwork Tue Dec 14 08:19:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8D85C433F5 for ; Tue, 14 Dec 2021 08:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231801AbhLNITc (ORCPT ); Tue, 14 Dec 2021 03:19:32 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231815AbhLNITc (ORCPT ); Tue, 14 Dec 2021 03:19:32 -0500 IronPort-Data: A9a23:rRS7YagkHvtso+9Q6NImmhoEX161fBIKZh0ujC45NGQNrF6WrkUPmmBOX2yDP/7YYmrzfY8gbNjk80tQuJHdx4A3HgRurXw8FHgiRejtX4rAdhiqV8+xwmwvdGo+toNGLICowPkcFhcwnT/wdOixxZVA/fvQHOOlUreYYnkZqTJME0/NtzoywobVvaY42bBVMyvV0T/Di5W31G2NglaYAUpIg063ky6Didyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrtJk57wdAsEX7zTIROTzHFRXsBOgDAb/mprjPl9b6FaNC+7iB3Q9zx14M9QvJqrWEEnOLbQsOoAURhECDw4NqpDkFPCCSHm4ZzMnxGWKRMAxN0rVinaJ7Yw9P1rDHpS7tQGJz0XKBOOneS7xPS8UOYEuyiJBKEHJ6tG4jc5k26fVq1gHPj+r2zxzYcw9F8NagpmQJ4yv/YkVAc= IronPort-HdrOrdr: A9a23:sDKEGKtNeLmy3M/XuWRM+VJ97skDStV00zEX/kB9WHVpm62j5qSTdZEguCMc5wx+ZJheo7q90cW7IE80lqQFhLX5X43SPzUO0VHARO5fBODZsl/d8kPFltJ15ONJdqhSLJnKB0FmsMCS2mKFOudl7N6Z0K3Av4vj80s= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878482" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id F03E04D144C2 for ; Tue, 14 Dec 2021 16:19:21 +0800 (CST) Received: from G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:23 +0800 Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:21 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:20 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 11/17] generic: add mmap CoW test for delalloc&source extents Date: Tue, 14 Dec 2021 16:19:08 +0800 Message-ID: <20211214081914.2478122-12-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: F03E04D144C2.A16C1 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode to the source file when the CoW range covers delalloc blocks and regular shared blocks. (MMAP version of generic/293,295) Signed-off-by: Shiyang Ruan --- tests/generic/909 | 65 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/909.out | 12 ++++++++ 2 files changed, 77 insertions(+) create mode 100755 tests/generic/909 create mode 100644 tests/generic/909.out diff --git a/tests/generic/909 b/tests/generic/909 new file mode 100755 index 00000000..88e032b6 --- /dev/null +++ b/tests/generic/909 @@ -0,0 +1,65 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 909 +# +# Ensuring that copy on write in mmap mode to the source file when the +# CoW range covers delalloc blocks and regular shared blocks. +# (MMAP version of generic/293,295) +# - Create two files. +# - Truncate the first file. +# - Write the odd blocks of the first file. +# - Reflink the odd blocks of the first file into the second file. +# - Write the even blocks of the first file. +# - mmap CoW the first file across the halfway mark, starting with the +# regular extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_sweave_reflink_holes_delalloc $blksz $nr $testdir/file1 >> $seqres.full +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 +exit diff --git a/tests/generic/909.out b/tests/generic/909.out new file mode 100644 index 00000000..4f9a5d33 --- /dev/null +++ b/tests/generic/909.out @@ -0,0 +1,12 @@ +QA output created by 909 +Format and mount +Create the original files +Compare files +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-909/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-909/file3 +b8a8a88d4c143f79900c4b4e79aa3e37 SCRATCH_MNT/test-909/file1.chk +mmap CoW across the transition +Compare files +35e2170e14665b780c6dec328d6a263b SCRATCH_MNT/test-909/file1 +ce2023f765eba19677517c511886d5c9 SCRATCH_MNT/test-909/file3 +35e2170e14665b780c6dec328d6a263b SCRATCH_MNT/test-909/file1.chk From patchwork Tue Dec 14 08:19:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A78AAC43219 for ; Tue, 14 Dec 2021 08:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231811AbhLNITc (ORCPT ); Tue, 14 Dec 2021 03:19:32 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:47274 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231801AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 IronPort-Data: A9a23:KSzmD6unGSKYot2uwYChootQ8OfnVEpcMUV32f8akzHdYEJGY0x3x2YcUWiAa/aNYzajLdwiPd6zpx4PvMDVy9FmSQFtriBgHilAwSbnLY7Hdx+vZUt+DSFioHpPtpxYMp+ZRCwNZie0SiyFb/6x/RGQ6YnSHuClUbSdZngoLeNZYHxJZSxLyrdRbrFA0YDR7zOl4bsekuWHULOX82cc3lE8t8pvnChSUMHa41v0iLCRicdj5zcyn1FNZH4WyDrYw3HQGuG4FcbiLwrPIS3Qw4/Xw/stIovNfrfTeUtMTKPQPBSVlzxdXK3Kbhpq/3R0i/hkcqFHLxo/ZzahxridzP1XqJW2UhZvMKvXhMwTThtZDzpje6ZB/dcrJFDm6JzDkB2aIyKEL/JGSRte0Zcj0uhsHWxV6ecwNj8AdFaAiviwzbb9TfNj7vnPhuGD0Jg34ykmlG+GS619B82rfkkD3vcAtB9YuyyENau2ixIlVAdS IronPort-HdrOrdr: A9a23:3MR9uawD6XO1QvwGTt9SKrPwEL1zdoMgy1knxilNoH1uA6ilfqWV8cjzuiWbtN9vYhsdcLy7WZVoIkmskKKdg7NhXotKNTOO0ASVxepZnOnfKlPbexHWx6p00KdMV+xEAsTsMF4St63HyTj9P9E+4NTvysyVuds= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878481" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id 1F4E64D144C3 for ; Tue, 14 Dec 2021 16:19:22 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:23 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:20 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 12/17] generic: add buffered-io CoW test for mixed&source extents Date: Tue, 14 Dec 2021 16:19:09 +0800 Message-ID: <20211214081914.2478122-13-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 1F4E64D144C3.A0338 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in buffered mode works when the CoW range originally covers multiple extents, mixed with reflinked, unwritten, hole, regular and delalloc blocks. Signed-off-by: Shiyang Ruan --- common/reflink | 51 +++++++++++++++++++++++++++++++++ tests/generic/910 | 65 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/910.out | 12 ++++++++ 3 files changed, 128 insertions(+) create mode 100755 tests/generic/910 create mode 100644 tests/generic/910.out diff --git a/common/reflink b/common/reflink index ee60398e..68dbdedd 100644 --- a/common/reflink +++ b/common/reflink @@ -426,3 +426,54 @@ _sweave_reflink_holes_delalloc() { _pwrite_byte 0x64 $((blksz * i)) $blksz $sfile.chk done } + +# Create a file of interleaved holes, unwritten blocks, regular blocks, and +# reflinked blocks +_sweave_reflink_rainbow() { + blksz=$1 + nr=$2 + sfile=$3 + dfile=$4 + + $XFS_IO_PROG -f -c "truncate $((blksz * nr))" $sfile + _pwrite_byte 0x00 0 $((blksz * nr)) $sfile.chk + _pwrite_byte 0x61 0 $((blksz * nr)) $dfile + seq 0 5 $((nr - 1)) | while read i; do + _pwrite_byte 0x61 $((blksz * i)) $blksz $sfile + _pwrite_byte 0x61 $((blksz * i)) $blksz $sfile.chk + done + # 0 blocks are reflinked + seq 0 5 $((nr - 1)) | while read i; do + _reflink_range $sfile $((blksz * i)) $dfile $((blksz * i)) $blksz + _pwrite_byte 0x61 $((blksz * i)) $blksz $sfile.chk + done + # 1 blocks are unwritten + seq 1 5 $((nr - 1)) | while read i; do + $XFS_IO_PROG -f -c "falloc $((blksz * i)) $blksz" $sfile + _pwrite_byte 0x00 $((blksz * i)) $blksz $sfile.chk + done + # 2 blocks are holes + seq 2 5 $((nr - 1)) | while read i; do + _pwrite_byte 0x00 $((blksz * i)) $blksz $sfile.chk + done + # 3 blocks are regular + seq 3 5 $((nr - 1)) | while read i; do + _pwrite_byte 0x71 $((blksz * i)) $blksz $sfile + _pwrite_byte 0x71 $((blksz * i)) $blksz $sfile.chk + done + # 4 blocks will be delalloc later +} + +# For a file created with _sweave_reflink_rainbow, fill the holes with delalloc +# extents +_sweave_reflink_rainbow_delalloc() { + blksz=$1 + nr=$2 + dfile=$3 + + # 4 blocks are delalloc (do later) + seq 4 5 $((nr - 1)) | while read i; do + _pwrite_byte 0x62 $((blksz * i)) $blksz $sfile + _pwrite_byte 0x62 $((blksz * i)) $blksz $sfile.chk + done +} diff --git a/tests/generic/910 b/tests/generic/910 new file mode 100755 index 00000000..32628060 --- /dev/null +++ b/tests/generic/910 @@ -0,0 +1,65 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 910 +# +# Ensuring that copy on write in buffered mode works when the CoW +# range originally covers multiple extents, mixed with reflinked, unwritten, +# hole, regular and delalloc blocks. +# - Create a file with the following repeating sequence of blocks: +# 1. reflinked +# 2. unwritten +# 3. hole +# 4. regular block +# 5. delalloc +# - CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone punch + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" +_require_xfs_io_command "fpunch" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_sweave_reflink_rainbow_delalloc $blksz $nr $testdir/file1 >> $seqres.full +# now cow +$XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full +_pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 diff --git a/tests/generic/910.out b/tests/generic/910.out new file mode 100644 index 00000000..12956584 --- /dev/null +++ b/tests/generic/910.out @@ -0,0 +1,12 @@ +QA output created by 910 +Format and mount +Create the original files +Compare files +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-910/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-910/file3 +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-910/file1.chk +CoW across the transition +Compare files +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-910/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-910/file3 +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-910/file1.chk From patchwork Tue Dec 14 08:19:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A029DC4332F for ; Tue, 14 Dec 2021 08:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231814AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:47274 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231795AbhLNITa (ORCPT ); Tue, 14 Dec 2021 03:19:30 -0500 IronPort-Data: A9a23:tMlKVazTUL+qHIEaWuh6t+crxCrEfRIJ4+MujC/XYbTApGsh0mEFymcbUGyDaazZNzfxfIggPNy+8k5XscTUzNJiHQtv/xmBbVoQ95OdWo7xwmQcns+qBpSaChohtq3yU/GYRCwPZiKa9kfF3oTJ9yEmjPjSH+akUYYoBwgqLeNaYHZ44f5cs75h6mJYqYDR7zKl4bsekeWGULOW82Ic3lYv1k62gEgHUMIeF98vlgdWifhj5DcynpSOZX4VDfnZw3DQGuG4EgMmLtsvwo1V/kuBl/ssItij1LjmcEwWWaOUNg+L4pZUc/H6xEEc+WppieBmXBYfQR4/ZzGhhc14zs5c85K2UhsBMLDOmfgGTl9TFCQW0ahuoeaXcSfv7ZPCp6HBWz62qxl0N2k4JpEV4fpsKX9B+OZeKz0XaB2HweWsz9qGpkNE7ig4BJCzetpB5Tc7lneEZcvKiKvrG83ijeK0Fh9q7iyWIcvjWg== IronPort-HdrOrdr: A9a23:SshaAaGyuYfcSXscpLqE1MeALOsnbusQ8zAXPiFKOHhom6mj+vxG88506faKslwssR0b+OxoW5PwJE80l6QFgrX5VI3KNGbbUQCTXeNfBOXZowHIKmnX8+5x8eNaebFiNduYNzNHpPe/zA6mM9tI+rW6zJw= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878479" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id 6BF6D4D144C4 for ; Tue, 14 Dec 2021 16:19:22 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:21 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:20 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 13/17] generic: add direct-io CoW test for mixed&source extents Date: Tue, 14 Dec 2021 16:19:10 +0800 Message-ID: <20211214081914.2478122-14-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 6BF6D4D144C4.A2B0F X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in direct-io mode works when the CoW range originally covers multiple extents, mixed with reflinked, unwritten, hole, regular and delalloc blocks. Signed-off-by: Shiyang Ruan --- tests/generic/911 | 66 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/911.out | 12 ++++++++ 2 files changed, 78 insertions(+) create mode 100755 tests/generic/911 create mode 100644 tests/generic/911.out diff --git a/tests/generic/911 b/tests/generic/911 new file mode 100755 index 00000000..01baa49a --- /dev/null +++ b/tests/generic/911 @@ -0,0 +1,66 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 911 +# +# Ensuring that copy on write in direct-io mode works when the CoW +# range originally covers multiple extents, mixed with reflinked, unwritten, +# hole, regular and delalloc blocks. +# - Create a file with the following repeating sequence of blocks: +# 1. reflinked +# 2. unwritten +# 3. hole +# 4. regular block +# 5. delalloc +# - directio CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone punch + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" +_require_xfs_io_command "fpunch" +_require_odirect + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "directio CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_sweave_reflink_rainbow_delalloc $blksz $nr $testdir/file1 >> $seqres.full +# now cow +$XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full +_pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 diff --git a/tests/generic/911.out b/tests/generic/911.out new file mode 100644 index 00000000..e098fe3c --- /dev/null +++ b/tests/generic/911.out @@ -0,0 +1,12 @@ +QA output created by 911 +Format and mount +Create the original files +Compare files +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-911/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-911/file3 +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-911/file1.chk +directio CoW across the transition +Compare files +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-911/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-911/file3 +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-911/file1.chk From patchwork Tue Dec 14 08:19:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4794C433F5 for ; Tue, 14 Dec 2021 08:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231808AbhLNIT3 (ORCPT ); Tue, 14 Dec 2021 03:19:29 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:47274 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231805AbhLNIT2 (ORCPT ); Tue, 14 Dec 2021 03:19:28 -0500 IronPort-Data: A9a23:iNk0Cak6yV9Eyw7NJLy5agbo5gyoJERdPkR7XQ2eYbTBsI5bp2RRnzFOXGDTaP/ZNjHzetkiao6/9hwP6MLRmNQwGwtv+CA2RRqmi+KfW43BcR2Y0wB+jyH7ZBs+qZ1YM7EsFehsJpPnjkrrYuiJQUVUj/nSH+OmUbKcY0ideCc/IMsfoUM68wIGqt4w6TSJK1vlVeLa+6UzCnf8s9JHGj58B5a4lf9alK+aVAX0EbAJTasjUFf2zxH5BX+ETE27ByOQroJ8RoZWSwtfpYxV8F81/z91Yj+kur39NEMXQL/OJhXIgX1TM0SgqkEa4HVsjeBgb7xBAatUo2zhc9RZ0shEs4ehDwkvJbHklvkfUgVDDmd1OqguFLrveCHv4ZPDkxKdG5fr67A0ZK0sBqUU+PlwB25m9vECLj0JKBeZiIqezqmnR/Jwnew9I8TxeoASoHdtyXfeF/lOfHxpa80m/vcBhHFp2J8IRq2YOqIkhfNUREyoS3Vy1p0/VfrSRNuVu0Q= IronPort-HdrOrdr: A9a23:ObLHBaPNGQZLBcBcTv2jsMiBIKoaSvp037BL7TEUdfUxSKGlfq+V8sjzqiWftN98YhAdcLO7Scy9qBHnhP1ICOAqVN/MYOCMghrLEGgN1+vf6gylMyj/28oY7q14bpV5YeeaMXFKyer8/ym0euxN/OW6 X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878473" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id CCB674D144C5; Tue, 14 Dec 2021 16:19:22 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:22 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:21 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 14/17] generic: add mmap CoW test for mixed&source extents Date: Tue, 14 Dec 2021 16:19:11 +0800 Message-ID: <20211214081914.2478122-15-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: CCB674D144C5.A14B7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Ensuring that copy on write in mmap mode works when the CoW range originally covers multiple extents, mixed with reflinked, unwritten, hole, regular and delalloc blocks. Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/912 | 66 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/912.out | 12 ++++++++ 2 files changed, 78 insertions(+) create mode 100755 tests/generic/912 create mode 100644 tests/generic/912.out diff --git a/tests/generic/912 b/tests/generic/912 new file mode 100755 index 00000000..83e08482 --- /dev/null +++ b/tests/generic/912 @@ -0,0 +1,66 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 912 +# +# Ensuring that copy on write in mmap mode works when the CoW +# range originally covers multiple extents, mixed with reflinked, unwritten, +# hole, regular and delalloc blocks. +# - Create a file with the following repeating sequence of blocks: +# 1. reflinked +# 2. unwritten +# 3. hole +# 4. regular block +# 5. delalloc +# - mmap CoW across the halfway mark, starting with the unwritten extent. +# - Check that the files are now different where we say they're different. +# +. ./common/preamble +_begin_fstest auto quick clone punch + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_scratch_delalloc +_require_xfs_io_command "falloc" +_require_xfs_io_command "fpunch" + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Create the original files" +blksz=65536 +nr=64 +filesize=$((blksz * nr)) +_sweave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +echo "mmap CoW across the transition" +cowoff=$((filesize / 4)) +cowsz=$((filesize / 2)) +_sweave_reflink_rainbow_delalloc $blksz $nr $testdir/file1 >> $seqres.full +# now cow +mmapsz=$((cowoff + cowsz)) +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1 >> $seqres.full +_mwrite_byte 0x63 $cowoff $cowsz $mmapsz $testdir/file1.chk >> $seqres.full +_scratch_cycle_mount + +echo "Compare files" +md5sum $testdir/file1 | _filter_scratch +md5sum $testdir/file3 | _filter_scratch +md5sum $testdir/file1.chk | _filter_scratch + +# success, all done +status=0 diff --git a/tests/generic/912.out b/tests/generic/912.out new file mode 100644 index 00000000..32f25a1d --- /dev/null +++ b/tests/generic/912.out @@ -0,0 +1,12 @@ +QA output created by 912 +Format and mount +Create the original files +Compare files +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-912/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-912/file3 +6366fd359371414186688a0ef6988893 SCRATCH_MNT/test-912/file1.chk +mmap CoW across the transition +Compare files +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-912/file1 +bdbcf02ee0aa977795a79d25fcfdccb1 SCRATCH_MNT/test-912/file3 +26aa3a0749b867ec58363c8539ee5471 SCRATCH_MNT/test-912/file1.chk From patchwork Tue Dec 14 08:19:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3DEAC433EF for ; Tue, 14 Dec 2021 08:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231805AbhLNIT3 (ORCPT ); Tue, 14 Dec 2021 03:19:29 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231788AbhLNIT2 (ORCPT ); Tue, 14 Dec 2021 03:19:28 -0500 IronPort-Data: A9a23:UCkaR6Bu1ntpoxVW/zXhw5YqxClBgxIJ4g17XOLfBgjt1zxx0mAHymJJC2vQO6qCNDP9cohxbYXnox9XvJaAx9UxeLYW3SszFioV86IpJjg4wn/YZnrUdouaJK5ex512huLocYZkHhcwmj/3auK49CMlifnRLlbBILWs1h5ZFFYMpBgJ2UoLd94R2uaEsPDha++/kYqaT/73ZDdJ7wVJ3lc8sMpvnv/AUMPa41v0tnRmDRxCUcS3e3M9VPrzLonpR5f0rxU9IwK0ewrD5OnREmLx9BFrBM6nk6rgbwsBRbu60Qqm0yIQAvb9xEMZ4HFaPqUTbZLwbW9NljyPhME3xtNWqbS+VAUoIrbR3u8aVnG0FgknZP0Wp++bfiTXXcu7iheun2HX6/t1EEwtIZYw5Ol6GydN+OYeJTRLaQqM799aaprTpvJE35xldZe0ethE/CwI8N0QNt5+KbirfkkAzYYwMO8Mu/1z IronPort-HdrOrdr: A9a23:RL/9/Kuya+oRlwzJOhPRC4EA7skDStV00zEX/kB9WHVpm62j5qSTdZEguCMc5wx+ZJheo7q90cW7IE80lqQFhLX5X43SPzUO0VHARO5fBODZsl/d8kPFltJ15ONJdqhSLJnKB0FmsMCS2mKFOudl7N6Z0K3Av4vj80s= X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878474" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 20CA24D144C6 for ; Tue, 14 Dec 2021 16:19:23 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:22 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:21 +0800 From: Shiyang Ruan To: CC: Subject: [PATCH v3 15/17] generic: add race test between reflink and mmap read Date: Tue, 14 Dec 2021 16:19:12 +0800 Message-ID: <20211214081914.2478122-16-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: 20CA24D144C6.A0065 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Test for races or FS corruption between reflink and mmap reading the target file. (MMAP version of generic/164,165) Signed-off-by: Shiyang Ruan --- common/reflink | 11 +++++++ tests/generic/913 | 72 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/913.out | 5 +++ 3 files changed, 88 insertions(+) create mode 100755 tests/generic/913 create mode 100644 tests/generic/913.out diff --git a/common/reflink b/common/reflink index 68dbdedd..455260c6 100644 --- a/common/reflink +++ b/common/reflink @@ -186,6 +186,17 @@ _read_range() { $XFS_IO_PROG $xfs_io_args -f -c "pread -q -v $offset $len" "$file" | cut -d ' ' -f '3-18' } +# Prints a range of a file as a hex dump +_mread_range() { + file="$1" + offset="$2" + len="$3" + xfs_io_args="$4" + + $XFS_IO_PROG $xfs_io_args -f -c "mmap -rw 0 $((offset + len))" \ + -c "mread -v $offset $len" "$file" | cut -d ' ' -f '3-18' +} + # Compare ranges of two files _compare_range() { file1="$1" diff --git a/tests/generic/913 b/tests/generic/913 new file mode 100755 index 00000000..f709c36c --- /dev/null +++ b/tests/generic/913 @@ -0,0 +1,72 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 913 +# +# Test for races or FS corruption between reflink and mmap reading the +# target file. (MMAP version of generic/164,165) +# +. ./common/preamble +_begin_fstest auto clone + +_register_cleanup "_cleanup" BUS + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_cp_reflink + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +finished_file=/tmp/finished +rm -rf $finished_file +mkdir $testdir + +loops=512 +nr_loops=$((loops - 1)) +blksz=65536 + +echo "Initialize files" +echo >> $seqres.full +_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full +_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full +_cp_reflink $testdir/file1 $testdir/file3 +_scratch_cycle_mount + +fbytes() { + egrep -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)' +} + +reader() { + while [ ! -e $finished_file ]; do + _mread_range $testdir/file3 0 $((loops * blksz)) | fbytes + done +} + +echo "Reflink and mmap reread the files!" +reader & +for i in `seq 1 2`; do + seq $nr_loops -1 0 | while read i; do + _reflink_range $testdir/file1 $((i * blksz)) \ + $testdir/file3 $((i * blksz)) $blksz >> $seqres.full + [ $? -ne 0 ] && break + done + seq $nr_loops -1 0 | while read i; do + _reflink_range $testdir/file2 $((i * blksz)) \ + $testdir/file3 $((i * blksz)) $blksz >> $seqres.full + [ $? -ne 0 ] && break + done +done +echo "Finished reflinking" +touch $finished_file +wait + +# success, all done +status=0 +exit diff --git a/tests/generic/913.out b/tests/generic/913.out new file mode 100644 index 00000000..a34df6ce --- /dev/null +++ b/tests/generic/913.out @@ -0,0 +1,5 @@ +QA output created by 913 +Format and mount +Initialize files +Reflink and mmap reread the files! +Finished reflinking From patchwork Tue Dec 14 08:19:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675595 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE65CC43217 for ; Tue, 14 Dec 2021 08:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:23835 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231809AbhLNITb (ORCPT ); Tue, 14 Dec 2021 03:19:31 -0500 IronPort-Data: A9a23:aUHv2KDB/ihnkxVW/wDhw5YqxClBgxIJ4g17XOLfVAmw1G8mgTMAzWpMUWHSbK7fZjDwLttzOoqyox5U7ceAx9UxeLYW3SszFioV86IpJjg4wn/YZnrUdouaJK5ex512huLocYZkHhcwmj/3auK49CMlifnRLlbBILWs1h5ZFFYMpBgJ2UoLd94R2uaEsPDha++/kYqaT/73ZDdJ7wVJ3lc8sMpvnv/AUMPa41v0tnRmDRxCUcS3e3M9VPrzLonpR5f0rxU9IwK0ewrD5OnREmLx9BFrBM6nk6rgbwsBRbu60Qqm0yIQAvb9xEMZ4HFaPqUTbZLwbW9NljyPhME3xtNWqbS+VAUoIrbR3u8aVnG0FgknZP0Wp++bfijXXcu7iheun2HX6/lsE0YwMqUb9/xxDGUI8uYXQBgDdQyOnP6t6Ky0R/Mqhck5KsTveoQFtRldIZvxZRo9acmbBfyUupkDh3Ft7v2i1M32P6IxAQeDpjyaC/GXBmoqNQ== IronPort-HdrOrdr: A9a23:dcTusqgAms4b8C7HRbCJZm/u83BQXuYji2hC6mlwRA09TyX4rbHLoB1/73LJYVkqNk3I5urrBEDtexLhHP1OkOws1NWZLWrbUQKTRekM0WKI+UyDJ8SRzI5g/JYlW61/Jfm1NlJikPv9iTPSL/8QhPWB74Ck7N2z80tQ X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878478" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id ABB764D144C7; Tue, 14 Dec 2021 16:19:23 +0800 (CST) Received: from G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:23 +0800 Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXJMPEKD02.g08.fujitsu.local (10.167.33.202) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:23 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:21 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 16/17] generic: add race test that mmap write to source of reflink Date: Tue, 14 Dec 2021 16:19:13 +0800 Message-ID: <20211214081914.2478122-17-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: ABB764D144C7.A129D X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Test for races or FS corruption when mmap writing to a file that's also the source of a reflink operation. (MMAP version of generic/167,166) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/914 | 64 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/914.out | 4 +++ 2 files changed, 68 insertions(+) create mode 100755 tests/generic/914 create mode 100644 tests/generic/914.out diff --git a/tests/generic/914 b/tests/generic/914 new file mode 100755 index 00000000..c51c44c7 --- /dev/null +++ b/tests/generic/914 @@ -0,0 +1,64 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 914 +# +# Test for races or FS corruption when mmap writing to a file that's also +# the source of a reflink operation. (MMAP version of generic/167,166) +# +. ./common/preamble +_begin_fstest auto clone + +_register_cleanup "_cleanup" BUS + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink +_require_cp_reflink + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +finished_file=/tmp/finished +rm -rf $finished_file +mkdir $testdir + +loops=1024 +nr_loops=$((loops - 1)) +blksz=65536 + +echo "Initialize file" +echo >> $seqres.full +_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full +_scratch_cycle_mount + +# Snapshot creator... +snappy() { + n=0 + while [ ! -e $finished_file ]; do + out="$(_cp_reflink $testdir/file1 $testdir/snap_$n 2>&1)" + res=$? + echo "$out" | grep -q "No space left" && break + test -n "$out" && echo "$out" + test $res -ne 0 && break + n=$((n + 1)) + done +} + +echo "Snapshot a file undergoing mmap rewrite" +snappy & +seq $nr_loops -1 0 | while read i; do + $XFS_IO_PROG -f -c "mmap -rw $((i * blksz)) $blksz" \ + -c "mwrite -S 0x63 $((i * blksz)) $blksz" $testdir/file1 >> $seqres.full +done +touch $finished_file +wait + +# success, all done +status=0 +exit diff --git a/tests/generic/914.out b/tests/generic/914.out new file mode 100644 index 00000000..1472055f --- /dev/null +++ b/tests/generic/914.out @@ -0,0 +1,4 @@ +QA output created by 914 +Format and mount +Initialize file +Snapshot a file undergoing mmap rewrite From patchwork Tue Dec 14 08:19:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyang Ruan X-Patchwork-Id: 12675593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C99E9C433FE for ; Tue, 14 Dec 2021 08:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231807AbhLNITa (ORCPT ); Tue, 14 Dec 2021 03:19:30 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:47274 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231801AbhLNIT3 (ORCPT ); Tue, 14 Dec 2021 03:19:29 -0500 IronPort-Data: A9a23:3FlwxKmdWCF1TIxUr48buxno5gyoJERdPkR7XQ2eYbTBsI5bpzYHzWJLWm+OO6zYYjOkKdp/Otiw8E4PvZLVmtBhTwto+CA2RRqmi+KfW43BcR2Y0wB+jyH7ZBs+qZ1YM7EsFehsJpPnjkrrYuiJQUVUj/nSH+OmUbKcY0ideCc/IMsfoUM68wIGqt4w6TSJK1vlVeLa+6UzCnf8s9JHGj58B5a4lf9alK+aVAX0EbAJTasjUFf2zxH5BX+ETE27ByOQroJ8RoZWSwtfpYxV8F81/z91Yj+kur39NEMXQL/OJhXIgX1TM0SgqkEa4HVsjeBgb7xBAatUo2zhc9RZ0shEs4ehDwkvJbHklvkfUgVDDmd1OqguFLrveCHv4ZPDkxKbG5fr67A0ZK0sBqUU+PlwB25m9vECLj0JKBeZiIqezqmnR/Jwnew9I8TxeoASoHdtyXfeF/lOfHxpa80m/vcBhHFp2J8IRq2YOqIkhfNUREyoS3Vy1p0/VfrSRNuVu0Q= IronPort-HdrOrdr: A9a23:7VnZx6OzDWal9sBcTv2jsMiBIKoaSvp037BL7TEUdfUxSKGlfq+V8sjzqiWftN98YhAdcLO7Scy9qBHnhP1ICOAqVN/MYOCMghrLEGgN1+vf6gylMyj/28oY7q14bpV5YeeaMXFKyer8/ym0euxN/OW6 X-IronPort-AV: E=Sophos;i="5.88,204,1635177600"; d="scan'208";a="118878475" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 14 Dec 2021 16:19:27 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id C97554D144C8; Tue, 14 Dec 2021 16:19:23 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 14 Dec 2021 16:19:25 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Tue, 14 Dec 2021 16:19:22 +0800 From: Shiyang Ruan To: CC: , "Darrick J . Wong" Subject: [PATCH v3 17/17] generic: add race test that mmap write to target of reflink Date: Tue, 14 Dec 2021 16:19:14 +0800 Message-ID: <20211214081914.2478122-18-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> References: <20211214081914.2478122-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 X-yoursite-MailScanner-ID: C97554D144C8.A00A7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Test for races or FS corruption when mmap writing to a file that's also the target of a reflink operation. (MMAP version of generic/168,170) Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- tests/generic/915 | 64 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/915.out | 4 +++ 2 files changed, 68 insertions(+) create mode 100755 tests/generic/915 create mode 100644 tests/generic/915.out diff --git a/tests/generic/915 b/tests/generic/915 new file mode 100755 index 00000000..365f304c --- /dev/null +++ b/tests/generic/915 @@ -0,0 +1,64 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# FS QA Test No. 915 +# +# Test for races or FS corruption when mmap writing to a file that's also +# the target of a reflink operation. (MMAP version of generic/168,170) +# +. ./common/preamble +_begin_fstest auto clone + +_register_cleanup "_cleanup" BUS + +# Import common functions. +. ./common/filter +. ./common/reflink + +# real QA test starts here +_require_scratch_reflink + +echo "Format and mount" +_scratch_mkfs > $seqres.full 2>&1 +_scratch_mount >> $seqres.full 2>&1 + +testdir=$SCRATCH_MNT/test-$seq +finished_file=/tmp/finished +rm -rf $finished_file +mkdir $testdir + +loops=1024 +nr_loops=$((loops - 1)) +blksz=65536 + +echo "Initialize files" +echo >> $seqres.full +_pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full +_pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full +_scratch_cycle_mount + +# mmap overwriter... +overwrite() { + while [ ! -e $finished_file ]; do + seq $nr_loops -1 0 | while read i; do + $XFS_IO_PROG -f -c "mmap -rw $((i * blksz)) $blksz" \ + -c "mwrite -S 0x63 $((i * blksz)) $blksz" $testdir/file2 >> $seqres.full + done + done +} + +echo "Reflink and mmap write the target" +overwrite & +seq 1 10 | while read j; do + seq 0 $nr_loops | while read i; do + _reflink_range $testdir/file1 $((i * blksz)) \ + $testdir/file2 $((i * blksz)) $blksz >> $seqres.full + [ $? -ne 0 ] && exit + done +done +touch $finished_file +wait + +# success, all done +status=0 +exit diff --git a/tests/generic/915.out b/tests/generic/915.out new file mode 100644 index 00000000..4e77847b --- /dev/null +++ b/tests/generic/915.out @@ -0,0 +1,4 @@ +QA output created by 915 +Format and mount +Initialize files +Reflink and mmap write the target