Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5183822pxv; Tue, 20 Jul 2021 22:29:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOR+HxM+C1rTB1I7/qkszTHU2JiM9DYUv64HgPpI1c2p8/3ZdcKEYkElMGOBvgSXHshIB7 X-Received: by 2002:a6b:3e8b:: with SMTP id l133mr4639150ioa.137.1626845347838; Tue, 20 Jul 2021 22:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626845347; cv=none; d=google.com; s=arc-20160816; b=FTJ5X0KRb0AMx2kqrYPsaXXFLow5ODihI9FPJ/o3Y6uVIb9ipJH35Tevhelxfc3fK+ SQoGUeLMs8jlfLSvGqROfv/mlUrsatNnzwQ4AVrNUfvrjlMIH2F6rCpjBpSCui8uB+2Q G0AJrEZ0tA6L3H9xGR/vM13dK4ZEc+RQTJTO/vKdK++5iTsciRPturatKpWJZ8+F4ga3 9m3l3IV487eBpdYeJrYNjc1Nw1cnneG9F1+uAwAzug/fYo+qHBuVSUlU1Ytv26DOeqND 0Ni7PcTGAGiIorjHGjq3xTTlYxKOoJqFuvLiU+FNztKZoPKYa4b1y0zHzr/RX5XSj3Oe zwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z2IEvzsnBTucRJ0bEs1jXLn59v41h2gNebpr0/oPxgo=; b=dLJ3jBPMvAZwXPtCqPm+gb/Ha5jSRtTt/RvUN918MKX/JIL7jWjVCY8WkgzEr5iP5q Zr0C+ild8mMQppOK/T82ACJJ8v5VLNSyahgIBohcm6ASNRh3v/09ppRMPYCZojSZ/kyJ K+nKaXziOxhF/Ooh4PdkF6QxFKr5H3sOntLnLM6NKLCA63lG92qTwCruWBXo3WrJM39E 0uJl6flo63i6PWpCCg95Z82bMDY0c4hkav1dhZS8xg8gX6lLUH+sSrSSus1b/dE1kikg Xj55rbu5qi0WwPdJE+PS2YjZt+PPVL+MQoddD9aMzfzCwoYFPG67BdGoqRJIPF3bA6U9 PTyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=f2b1gwfs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si25264221jak.113.2021.07.20.22.28.56; Tue, 20 Jul 2021 22:29:07 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=f2b1gwfs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbhGUErt (ORCPT + 99 others); Wed, 21 Jul 2021 00:47:49 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:15862 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232249AbhGUErn (ORCPT ); Wed, 21 Jul 2021 00:47:43 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L53anw142312; Wed, 21 Jul 2021 01:28:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Z2IEvzsnBTucRJ0bEs1jXLn59v41h2gNebpr0/oPxgo=; b=f2b1gwfsDG5phYf00DGVYkP61vDPk07tc0zxM6vvYqBl/R9RsLiM0cX56i/98/JlKmsQ O7ZnU0qZyNdrTL7CUN3dRcarBSijQ3Q2/wtkicS83+GZGTzUWuTo/8S47v3dc3rZIx+j jMZnSziTl+Z+79XluGvFps0GmXBke5oxEmj9jPJDZevM2RvL7u0sizfQdH7ICygi1SIL DN1eS0ngjaFZFuJ86H2ZD8BoMcsE+VJaqbGweeYaoYIwEzqw8fZAWRD7qtt0gMJ7xQII Y04eWA6Q7uJvswMfeD6tSHRu/41LpS2AzhyHDHE2T3V5W1BKYz3LvV4VvzclmLt95kRo og== Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 39xan7bgj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:17 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5GEFu030534; Wed, 21 Jul 2021 05:28:15 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03fra.de.ibm.com with ESMTP id 39upu8901u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:15 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5SD6O30802294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:13 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E63C1AE051; Wed, 21 Jul 2021 05:28:12 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7FFBBAE04D; Wed, 21 Jul 2021 05:28:12 +0000 (GMT) Received: from localhost (unknown [9.85.82.121]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Jul 2021 05:28:12 +0000 (GMT) From: Ritesh Harjani To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, "Theodore Ts'o" , "Darrick J . Wong" , Ritesh Harjani Subject: [PATCHv2 5/9] generic/031: Fix the test case for 64k blocksize config Date: Wed, 21 Jul 2021 10:57:58 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: z4nERXEnl1oTBpAdJj9ktYtYo_7fsAKK X-Proofpoint-GUID: z4nERXEnl1oTBpAdJj9ktYtYo_7fsAKK X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-21_02:2021-07-21,2021-07-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 phishscore=0 impostorscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210025 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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))" \ + -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