Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp999998pxy; Sun, 1 Aug 2021 09:02:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBoixErZAC4u4FJpc9aqsM3ERZqBobCfr/WmuCrVjWYvRLfMwXeRiBsivbpTXzf/BfavPM X-Received: by 2002:a92:9412:: with SMTP id c18mr2611768ili.38.1627833758997; Sun, 01 Aug 2021 09:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627833758; cv=none; d=google.com; s=arc-20160816; b=O2MWktsxsCt7ziv26LzKyw+qOSkcCiR6xpGbjGD1Akh2EoCgReRjPx9hpn44LwGTaJ W3cn7Lk2uNwVtvG8Ig7kZd62LIz44mksiv8DJ3elaJnPTW0G75IASRyiBcGIPCGQ2JWq Oy+FKYK0KCJ005S9N7TzTnq0tlNYt4oB7HFInWoS3XL0+zuP4VNQqefjp4aPb74kv4cR gLuXeCZ+EbsMNJjBMIWgyGPXT+9yO9lL6lmYyNUdfAYtFqSFgoJmE0EttmNc0ni9vgSI rqyLN2zreQD4Y860W3ZVtkcrsSByjqt51HVD0Ykg+y8/KCVHAuxtitxvvdUWxWxTU1/n 077Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=J4uDxwAW5aY/nKnKOJJ0IE2bZ59NtlbfpscnZf31NGQ=; b=EM96xekGMe3WW5LXdmdV/MIlb1G7yGhltyoZgiZwuAXjFVB+lw9RlqnWaZo9IeUUZJ BrIFKSE1+jp/6NEQE2OQXHlJr3sRxkyIn8btl86/OKxOyu6RvA/RL9zPC87I5ecjgodm PO6su/BNZYPyqx1Fx4M28oY9dQoLzYGspQX9sRuN/Nr6LmKELQeT90basIVMUZxBKNbK 6EIAmRZkRP/s69cwA4Cx/n2f3Pa99vG3KxETXlr/YXR1izGsyU4eoDr5btz5+Nu7wUK4 lJvsP6UdkAG99La7M7HIuZyuSFmEIqMYay2O/1ugN5Y67oOB2LyIsRpEeoSdr3o+Cqew o6rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si9166960ilk.97.2021.08.01.09.02.18; Sun, 01 Aug 2021 09:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232297AbhHAQAh (ORCPT + 99 others); Sun, 1 Aug 2021 12:00:37 -0400 Received: from out20-2.mail.aliyun.com ([115.124.20.2]:43470 "EHLO out20-2.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbhHAQAZ (ORCPT ); Sun, 1 Aug 2021 12:00:25 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07865121|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.427253-0.00360999-0.569137;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047198;MF=guan@eryu.me;NM=1;PH=DS;RN=5;RT=5;SR=0;TI=SMTPD_---.Ktt9fTh_1627833615; Received: from localhost(mailfrom:guan@eryu.me fp:SMTPD_---.Ktt9fTh_1627833615) by smtp.aliyun-inc.com(10.147.41.143); Mon, 02 Aug 2021 00:00:15 +0800 Date: Mon, 2 Aug 2021 00:00:14 +0800 From: Eryu Guan To: Ritesh Harjani Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org, Theodore Ts'o , "Darrick J . Wong" Subject: Re: [PATCHv2 5/9] generic/031: Fix the test case for 64k blocksize config Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jul 21, 2021 at 10:57:58AM +0530, Ritesh Harjani wrote: > This test fails with blocksize 64k since the test assumes 4k blocksize > in fcollapse param. This patch fixes that and also tests for 64k > blocksize. > > Signed-off-by: Ritesh Harjani > --- > tests/generic/031 | 14 +++++++++----- > tests/generic/031.out | 16 ++++++++-------- > 2 files changed, 17 insertions(+), 13 deletions(-) > > diff --git a/tests/generic/031 b/tests/generic/031 > index 313ce9ff..11961c54 100755 > --- a/tests/generic/031 > +++ b/tests/generic/031 > @@ -26,11 +26,16 @@ testfile=$SCRATCH_MNT/testfile > _scratch_mkfs > /dev/null 2>&1 > _scratch_mount > > +# fcollapse need offset and len to be multiple of blocksize for filesystems > +# So let's make the offsets and len required for fcollapse multiples of 64K > +# so that it works for all configurations (including on dax on 64K page size > +# systems) > +fact=$((65536/4096)) > $XFS_IO_PROG -f \ > - -c "pwrite 185332 55756" \ > - -c "fcollapse 28672 40960" \ > - -c "pwrite 133228 63394" \ > - -c "fcollapse 0 4096" \ > + -c "pwrite $((185332*fact + 12)) $((55756*fact + 12))" \ Where does this 12 come from? And I'm wondering if this still reproduces the original bug. And looks like that the original test setups came from a specific fsstress or fsx run, and aimed to the specific bug, perhaps we could require the test with <= 4k block size, and _notrun in 64k case. Thanks, Eryu > + -c "fcollapse $((28672 * fact)) $((40960 * fact))" \ > + -c "pwrite $((133228 * fact + 12)) $((63394 * fact + 12))" \ > + -c "fcollapse 0 $((4096 * fact))" \ > $testfile | _filter_xfs_io > > echo "==== Pre-Remount ===" > @@ -41,4 +46,3 @@ hexdump -C $testfile > > status=0 > exit > - > diff --git a/tests/generic/031.out b/tests/generic/031.out > index 194bfa45..7dfcfe41 100644 > --- a/tests/generic/031.out > +++ b/tests/generic/031.out > @@ -1,19 +1,19 @@ > QA output created by 031 > -wrote 55756/55756 bytes at offset 185332 > +wrote 892108/892108 bytes at offset 2965324 > XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > -wrote 63394/63394 bytes at offset 133228 > +wrote 1014316/1014316 bytes at offset 2131660 > XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > ==== Pre-Remount === > 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > * > -0001f860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................| > -0001f870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................| > +001f86c0 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................| > +001f86d0 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................| > * > -0002fdc0 > +002fdc18 > ==== Post-Remount == > 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > * > -0001f860 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................| > -0001f870 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................| > +001f86c0 00 00 00 00 00 00 00 00 00 00 00 00 cd cd cd cd |................| > +001f86d0 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd |................| > * > -0002fdc0 > +002fdc18 > -- > 2.31.1