From patchwork Wed Jul 21 05:27:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C755C07E9B for ; Wed, 21 Jul 2021 05:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A7D46120A for ; Wed, 21 Jul 2021 05:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231706AbhGUErh (ORCPT ); Wed, 21 Jul 2021 00:47:37 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:6834 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbhGUErg (ORCPT ); Wed, 21 Jul 2021 00:47:36 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L53cX7141889; Wed, 21 Jul 2021 01:28:11 -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=9Np2L/LAETvvlbt0YW+1IL4LWzJK4iBwFoueHenf0bs=; b=k7NbFn4sszEg85AKgRyLtg4yrnu04iGJ+mRgdSQFIxCwQJPsptIhzCmSno7sJgGFfkco Kpvw5cpEGTnbtKATrg7DdGLz0fxJ5poXzwLzdnUAda5DoPQskRF/PPsJ91I3XJLgMcFq lYsD+c8IGo2RzbX4g6B+gSpn1W7Gx+XVM8729GMGfn+5w4+dKMENv8ApIuURFP2jnwfw 1kjCN0Q89CmBVj5V8TFfFP2xYlSe+gHtoNVMAD5ElhuIPek4HTiixbv4yavTdxiQsUdE nf6qaJMDzSOvDtm9g4yzJMv4rkM2N/r9Z+EfvaMuo8GVDxnc55v4tmHeWwgIxQvc+dGu 8w== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 39xchqh68y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:11 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5DfLS018827; Wed, 21 Jul 2021 05:28:09 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 39upu89nv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:08 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5S6g324510974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:06 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A17AAE045; Wed, 21 Jul 2021 05:28:06 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16247AE053; Wed, 21 Jul 2021 05:28:06 +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:05 +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 1/9] ext4/003: Fix this test on 64K platform for dax config Date: Wed, 21 Jul 2021 10:57:54 +0530 Message-Id: <406b10052920a617cb22b8cf5009e3db671d26da.1626844259.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: RRU1A558O9VX4kOp_iwOFvIPetXjvcKZ X-Proofpoint-GUID: RRU1A558O9VX4kOp_iwOFvIPetXjvcKZ 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 priorityscore=1501 impostorscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210025 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org mkfs.ext4 by default uses 4K blocksize which doesn't mount when testing with dax config and the test fails. This patch fixes it. Signed-off-by: Ritesh Harjani --- tests/ext4/003 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ext4/003 b/tests/ext4/003 index 3c9a8486..773bcb03 100755 --- a/tests/ext4/003 +++ b/tests/ext4/003 @@ -26,7 +26,8 @@ _supported_fs ext4 _require_scratch _require_scratch_ext4_feature "bigalloc" -$MKFS_EXT4_PROG -F -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \ +BLOCK_SIZE=$(get_page_size) +$MKFS_EXT4_PROG -F -b $BLOCK_SIZE -O bigalloc -C $(($BLOCK_SIZE * 16)) -g 256 $SCRATCH_DEV 512m \ >> $seqres.full 2>&1 _scratch_mount From patchwork Wed Jul 21 05:27:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEA5FC12002 for ; Wed, 21 Jul 2021 05:28:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B6EE6120A for ; Wed, 21 Jul 2021 05:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231219AbhGUErk (ORCPT ); Wed, 21 Jul 2021 00:47:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55286 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbhGUErh (ORCPT ); Wed, 21 Jul 2021 00:47:37 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L5EVG4030634; Wed, 21 Jul 2021 01:28:13 -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 : content-transfer-encoding : mime-version; s=pp1; bh=gfIYQGl9pwnUKP9FGc7nxHIPbu8S7N/shZ66IxgK9a4=; b=lS/k+ICqcpOyGwZLvcKcd/fyB71SvuDxWdTzSBVwDJ35u3ospoL/zHo/AsAOIAjTlP11 d2ypa+Yh6j5nCVdNBCrE7+6bn2kli2iZGwQ5aIn5FdtEX+88h1OwviHIF9TAsUe1EU0C TcYs56O94i1XZNUnBtj2evcAL6gmtNoFz8RwTMsdkPziRU8LS/DFnoOaLBQRsMeMylE7 cXuiP1ABq3ZpUgFtnMXv0A6WjULzRyDSitSKHbEu7EWGQIZkIxaAaeuWh1b3ir5O0fIL PaEaQtmaN+dhs4ithWxz4UHLVa6F1oIjanVjiXbpT9oNLo5vxRaHnLouKWeRQem5KNtH 7A== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 39xd8k880m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:12 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5DFuh027487; Wed, 21 Jul 2021 05:28:10 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06fra.de.ibm.com with ESMTP id 39upfh90d5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:10 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5Pj2w24903992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:25:45 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0EC5AAE051; Wed, 21 Jul 2021 05:28:08 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5F1CAE04D; Wed, 21 Jul 2021 05:28:07 +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:07 +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 2/9] ext4/027: Correct the right code of block and inode bitmap Date: Wed, 21 Jul 2021 10:57:55 +0530 Message-Id: <144ceb12f492e81f781aeddd164e8c3860cfd358.1626844259.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VjEPomlByIgJ-6NN6iv2Q1X_DQo9ovG- X-Proofpoint-ORIG-GUID: VjEPomlByIgJ-6NN6iv2Q1X_DQo9ovG- X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 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 lowpriorityscore=0 bulkscore=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 phishscore=0 adultscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210025 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Observed occasional failure of this test sometimes say with 64k config and small device size. Reason is we were grepping for wrong values for inode and block bitmap. Correct those values according to [1] to fix this test. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/fsmap.h#n53 Reviewed-by: Darrick J. Wong Signed-off-by: Ritesh Harjani --- tests/ext4/027 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ext4/027 b/tests/ext4/027 index 84e11a29..5bcb2d55 100755 --- a/tests/ext4/027 +++ b/tests/ext4/027 @@ -39,11 +39,11 @@ x=$(grep -c 'static fs metadata' $TEST_DIR/fsmap) test $x -gt 0 || echo "No fs metadata?" echo "Check block bitmap" | tee -a $seqres.full -x=$(grep -c 'special 102:1' $TEST_DIR/fsmap) +x=$(grep -c 'special 102:3' $TEST_DIR/fsmap) test $x -gt 0 || echo "No block bitmaps?" echo "Check inode bitmap" | tee -a $seqres.full -x=$(grep -c 'special 102:2' $TEST_DIR/fsmap) +x=$(grep -c 'special 102:4' $TEST_DIR/fsmap) test $x -gt 0 || echo "No inode bitmaps?" echo "Check inodes" | tee -a $seqres.full From patchwork Wed Jul 21 05:27:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95ACBC07E9B for ; Wed, 21 Jul 2021 05:28:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 796666120F for ; Wed, 21 Jul 2021 05:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232447AbhGUEr5 (ORCPT ); Wed, 21 Jul 2021 00:47:57 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:3324 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232323AbhGUErn (ORCPT ); Wed, 21 Jul 2021 00:47:43 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L5EjpR030863; Wed, 21 Jul 2021 01:28:19 -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=+vw/7gKN0LmiBw5e83d/WZLglU6zOKQTmJQZKg6TM3A=; b=PK7uC4lg8FIicmMK3JZ/c/lQnIdEL2sGpTG5pCxN0tE7P+XLiDMgJJOQ8nks6yl15uPC vlyGHm5LxifJub2kCv0hX7y58sv5vmHXvnEPb/eyPP/F73ZmZ1cfZ5iNTIH0v2XQGcL8 R+v6hC4e+udV2UkIVSyKiTbUnvUQ6/Ri9j+P0tMBbPpN77/fbowoHy5wrmXXlsGnTJPs rv0QTMC9a7ViX8AstMfxPcL/KeHSpTQG4W1MvDcqvdOhR6RhTKBMpMoqKKLDa8EmLn6X hVukzmzLwJgG2jnpeMpkN/iwhG3QgtnxmsOwvSP1VfBa668ziqhMT54kDnnflu/Zr1Jg xw== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 39xd8k880y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:14 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5FgoJ004331; Wed, 21 Jul 2021 05:28:12 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma02fra.de.ibm.com with ESMTP id 39upu890d6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:11 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5S93U35783094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:09 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7AAD7AE04D; Wed, 21 Jul 2021 05:28:09 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B040AE053; Wed, 21 Jul 2021 05:28:09 +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:08 +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 3/9] ext4/306: Add -b blocksize parameter too to avoid failure with DAX config Date: Wed, 21 Jul 2021 10:57:56 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ps8IPZDqK5IKn5ifa7IOLPTNA1kUUUOG X-Proofpoint-ORIG-GUID: ps8IPZDqK5IKn5ifa7IOLPTNA1kUUUOG 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 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210025 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org mkfs.ext4 by default uses 4K blocksize. On DAX config with a 64K pagesize platform (PPC64), this will fail to mount since DAX requires bs == ps. Hence add the -b blocksize paramter in ext4/306. Reviewed-by: Theodore Ts'o Signed-off-by: Ritesh Harjani --- tests/ext4/306 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/ext4/306 b/tests/ext4/306 index 4a339570..2ff88537 100755 --- a/tests/ext4/306 +++ b/tests/ext4/306 @@ -33,7 +33,10 @@ features="^extents" if grep -q 64bit /etc/mke2fs.conf ; then features="^extents,^64bit" fi -$MKFS_EXT4_PROG -F -O "$features" $SCRATCH_DEV 512m >> $seqres.full 2>&1 + +blksz=$(get_page_size) + +$MKFS_EXT4_PROG -F -b $blksz -O "$features" $SCRATCH_DEV 512m >> $seqres.full 2>&1 _scratch_mount # Create a small non-extent-based file From patchwork Wed Jul 21 05:27:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390041 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A912C07E9B for ; Wed, 21 Jul 2021 05:28:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A041611CE for ; Wed, 21 Jul 2021 05:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbhGUErr (ORCPT ); Wed, 21 Jul 2021 00:47:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:10198 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232215AbhGUErl (ORCPT ); Wed, 21 Jul 2021 00:47:41 -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 16L53aLY142228; Wed, 21 Jul 2021 01:28:16 -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=P7+4CvfvrOi+e26Mgsv0rRbb9r5BcCUfRTdJ+LSyTKE=; b=IZve1yYWJq0qR9udIQgxIdabppY10HeoYhpyIw/PTEd6b03FiiC1P6t4GwvqRZgK539Q kJpBOf2DfJ8fSuuryt3HGOS7I5zj8euxbh3YTiZrz4oG2ByTM3JgCt5NajMnlpaQMFYI wqWR5OyfwFdbMsXgAVeQYuyJD3uiIrk6hqxK2jRXbUItTmxG1AoHKDJ4ZJAZYaMjijbW l9UTE7AIJ8drsZYwvM56g5UPJGeNsL6oaesyltgc1uuDo23WKa4gE2JFGmUOxs7SrZNx aVH7faK9uK+O+hVbIKHwkdtMGtVhmQGQZdt8HjZnQCgL/hBgtgSJOcOqZywgorrsBGeg yQ== 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 39xan7bghh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:16 -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 16L5DhKV028474; Wed, 21 Jul 2021 05:28:14 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03fra.de.ibm.com with ESMTP id 39upu8901t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:13 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5SBiQ27656624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:11 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 453FDAE045; Wed, 21 Jul 2021 05:28:11 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF75EAE056; Wed, 21 Jul 2021 05:28:10 +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:10 +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 4/9] ext4/022: exclude this test for dax config on 64KB pagesize platform Date: Wed, 21 Jul 2021 10:57:57 +0530 Message-Id: <3e4a18ec37b9a7164cab20b6bf97c65574099f32.1626844259.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: eCkGId7jvbBrpu_XoVAk1AXJzsRBS0eB X-Proofpoint-GUID: eCkGId7jvbBrpu_XoVAk1AXJzsRBS0eB 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: fstests@vger.kernel.org This test case assumes blocksize to be 4KB and hence it fails to mount with "-o dax" option on a 64kb pagesize platform (e.g. PPC64). This leads to test case reported as failed with dax config on PPC64. This patch exclude this test when pagesize is 64KB and for dax config. Reviewed-by: Theodore Ts'o Signed-off-by: Ritesh Harjani --- tests/ext4/022 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ext4/022 b/tests/ext4/022 index fdc19d93..321050b3 100755 --- a/tests/ext4/022 +++ b/tests/ext4/022 @@ -25,10 +25,13 @@ _require_dumpe2fs _require_command "$DEBUGFS_PROG" debugfs _require_attrs -# Use large inodes to have enough space for experimentation -INODE_SIZE=1024 # Block size BLOCK_SIZE=4096 +if [[ $(get_page_size) -ne $BLOCK_SIZE ]]; then + _exclude_scratch_mount_option dax +fi +# Use large inodes to have enough space for experimentation +INODE_SIZE=1024 # We leave this amount of bytes for xattrs XATTR_SPACE=256 # We grow extra_isize by this much From patchwork Wed Jul 21 05:27:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52D17C12002 for ; Wed, 21 Jul 2021 05:28:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D2B061208 for ; Wed, 21 Jul 2021 05:28:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232477AbhGUErs (ORCPT ); Wed, 21 Jul 2021 00:47:48 -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 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: fstests@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 From patchwork Wed Jul 21 05:27:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 490DBC07E9B for ; Wed, 21 Jul 2021 05:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32A416120A for ; Wed, 21 Jul 2021 05:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232546AbhGUEru (ORCPT ); Wed, 21 Jul 2021 00:47:50 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51984 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232334AbhGUErn (ORCPT ); Wed, 21 Jul 2021 00:47:43 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L54PcT112181; Wed, 21 Jul 2021 01:28:19 -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=h0xH88DU7nHUfD5D/YtLPlvXL9cnO/piE/hv+MV2RwQ=; b=Qob7cQbtm8Mv9ZGPBhW8QNG3nPzqzwKQhLXbGGwccE8sbERapwIagkKl918RfmaM/V0n nydPmxWR/t0zSSQRGQfT/MJ/FEAZyat/ytuju5ehIuPVNsbS0GdUaY20p70JTr6qK04a LUVfQpo3LG2iJvz2ZaQ3ynzLFDPJCTqgf+sUR7kGs/PUkb7bO/IM3AW/kYvGOyNlz0mx rPQzaPg2mjLwRPrger72o2cAyZZmJCHgJGsMfxJSmEYDv1kHXb5DzCMNYOGuJUgLcudG XLQY/h9QX8pCvAjJYQ38yk1B4m41sz9FSgPE2c5O+nRkiMLrrHT2NC8o3cmttAPC63eD yg== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 39xbaraqv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:19 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5DjYk018835; Wed, 21 Jul 2021 05:28:17 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 39upu89nv3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:16 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5PnXd17498524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:25:49 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80BB9AE055; Wed, 21 Jul 2021 05:28:14 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21FEBAE045; Wed, 21 Jul 2021 05:28:14 +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:13 +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 6/9] common/rc: Add _mkfs_dev_blocksized functionality Date: Wed, 21 Jul 2021 10:57:59 +0530 Message-Id: <0cc5f31ca1e4ef56367d041b86e7dcb78e1e033e.1626844259.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: oH0hOxGOaHPETxLRD2KUNa3sIHtk5awD X-Proofpoint-GUID: oH0hOxGOaHPETxLRD2KUNa3sIHtk5awD 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 priorityscore=1501 mlxscore=0 suspectscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=879 spamscore=0 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107210025 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This adds _mkfs_dev_blocksized functionality. Signed-off-by: Ritesh Harjani --- common/rc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/common/rc b/common/rc index d4b1f21f..b5fe5c71 100644 --- a/common/rc +++ b/common/rc @@ -722,6 +722,53 @@ _mkfs_dev() rm -f $tmp.mkfserr $tmp.mkfsstd } +_set_mkfs_options_blocksized() +{ + local blocksize=$1 + local re='^[0-9]+$' + + if ! [[ $blocksize =~ $re ]]; then + _notrun "error _set_mkfs_options_blocksized: blocksize \"$blocksize\" not an integer" + fi + + case $FSTYP in + btrfs) + test -f /sys/fs/btrfs/features/supported_sectorsizes || \ + _notrun "Subpage sectorsize support is not found in $FSTYP" + + grep -wq $blocksize /sys/fs/btrfs/features/supported_sectorsizes || \ + _notrun "$FSTYP does not support sectorsize=$blocksize yet" + + MKFS_OPTIONS=" --sectorsize=$blocksize" + ;; + xfs) + MKFS_OPTIONS=" -b size=$blocksize" + ;; + ext2|ext3|ext4) + MKFS_OPTIONS=" -b $blocksize" + ;; + gfs2) + MKFS_OPTIONS=" -O -b $blocksize" + ;; + ocfs2) + MKFS_OPTIONS=" -b $blocksize -C $blocksize" + ;; + bcachefs) + MKFS_OPTIONS=" --block_size=$blocksize" + ;; + *) + # do nothing for other FS. + ;; + esac +} + +_mkfs_dev_blocksized() +{ + _set_mkfs_options_blocksized $1 + shift + _mkfs_dev $* +} + # remove all files in $SCRATCH_MNT, useful when testing on NFS/CIFS _scratch_cleanup_files() { From patchwork Wed Jul 21 05:28:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31B6FC12002 for ; Wed, 21 Jul 2021 05:28:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1518461208 for ; Wed, 21 Jul 2021 05:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbhGUEsB (ORCPT ); Wed, 21 Jul 2021 00:48:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46396 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232390AbhGUErq (ORCPT ); Wed, 21 Jul 2021 00:47:46 -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 16L53aSr142258; Wed, 21 Jul 2021 01:28:20 -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=x3GRL6dsgm9fWp6B0aJqjR3QHgva7/Dk+PzVsS5AmYA=; b=HzIRgAwafym51fGLBHYlvVkq532jqhf6b0zVhBzaANP/mlGkJHk+Sz3+g+TPGL8Fnkbc TEPYtA7t09q0cwSRFtV85/V8ER1FObehChyRQAHtT9L3dcVxPbqlzmfGNVj1bu38Ce7q RHlIyPuzWd4ckSgPRYABWmaSsWhvR9CBaWDog30cSBlrUks+kRjfrS6Z6eXKw4ZYEPr4 +8FjMdpJ8Yjb5fQs0/0y5pSL3TDiGVWN/7ciZwRoAxC41WzvTt4xCDk6cz/b0Isk/V28 mSk/i01J22oNpcyw8ujwEibfshUdLtOtt5+vC4Ck2YJE7pF49tXoeeJaIlqNouRPXVVb 2w== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 39xan7bgjy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:20 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5Cxfb015125; Wed, 21 Jul 2021 05:28:18 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 39upu89p3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:18 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5SG7W35783102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:16 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2117CAE051; Wed, 21 Jul 2021 05:28:16 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF951AE045; Wed, 21 Jul 2021 05:28:15 +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:15 +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 7/9] generic/620: Use _mkfs_dev_blocksized to use 4k bs Date: Wed, 21 Jul 2021 10:58:00 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: sTf-rnZsURHasWDAu00e0oh7HHm7fX-V X-Proofpoint-GUID: sTf-rnZsURHasWDAu00e0oh7HHm7fX-V 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=1011 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: fstests@vger.kernel.org ext4 with 64k blocksize (passed by user config) fails with below error for this given test which requires dmhugedisk. Since this test anyways only requires 4k bs, so use _mkfs_dev_blocksized() to fix this. mkfs.ext4: Input/output error while writing out and closing file system Signed-off-by: Ritesh Harjani --- tests/generic/620 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/generic/620 b/tests/generic/620 index b052376f..444e682d 100755 --- a/tests/generic/620 +++ b/tests/generic/620 @@ -42,7 +42,9 @@ sectors=$((2*1024*1024*1024*17)) chunk_size=128 _dmhugedisk_init $sectors $chunk_size -_mkfs_dev $DMHUGEDISK_DEV + +# Use 4k blocksize. +_mkfs_dev_blocksized 4096 $DMHUGEDISK_DEV _mount $DMHUGEDISK_DEV $SCRATCH_MNT || _fail "mount failed for $DMHUGEDISK_DEV $SCRATCH_MNT" testfile=$SCRATCH_MNT/testfile-$seq From patchwork Wed Jul 21 05:28:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 530B0C12002 for ; Wed, 21 Jul 2021 05:28:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3BCBD6120A for ; Wed, 21 Jul 2021 05:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232684AbhGUEry (ORCPT ); Wed, 21 Jul 2021 00:47:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54004 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232468AbhGUErr (ORCPT ); Wed, 21 Jul 2021 00:47:47 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16L5PhS4074824; Wed, 21 Jul 2021 01:28:22 -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=fvM/PnRjCvDKCI6UBB2Ggn5mKmT6PMY9L8YjfIE0Nis=; b=Pvx7zDSIi4p/Wsc29ilBMv7RlE5Hhbzxx8QlhXhf2jwAk35JKzLSlJWlyzcXRUSE2CB8 15xfkt120kUgh5iowz8Iuo+1y5jLcrvC1U77mH3+QBF/5+cD+nc8Sv3KuT3YZNBERgIg o048TPKpi/7oKfQGobiG3ajRPtWwMENFU8MtjQ3e9o/FJXo+GyPmT4zKEcmJoTxu9Vft DypqrzcI7LV0SdFTdtHYIfMQZZZQ2zeKhQvgCTT9b9JkEgprjYU2RtUNvPtntQBZHoV4 worO3XbO5lr5vxgYknUSZFTQIi8lR2BKi4++QIXUcNdsCfzVsIi0FRev7FpS1imbAlcv Xw== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 39xde4r0yn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:22 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5DhhQ015359; Wed, 21 Jul 2021 05:28:20 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06ams.nl.ibm.com with ESMTP id 39vng71a4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:20 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16L5SIcG16777626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:18 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1350FAE045; Wed, 21 Jul 2021 05:28:18 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8980DAE051; Wed, 21 Jul 2021 05:28:17 +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:17 +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 8/9] common/attr: Cleanup end of line whitespaces issues Date: Wed, 21 Jul 2021 10:58:01 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: S5uGauHQG8QBSO9FfVLSRDstWdJAXgMG X-Proofpoint-GUID: S5uGauHQG8QBSO9FfVLSRDstWdJAXgMG 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 priorityscore=1501 suspectscore=0 impostorscore=0 adultscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 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: fstests@vger.kernel.org This patch clears the end of line whitespace issues in this file. Mostly since many kernel developers also keep this editor config to clear any end of line whitespaces on file save. Reviewed-by: Theodore Ts'o Reviewed-by: Darrick J. Wong Signed-off-by: Ritesh Harjani --- common/attr | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/attr b/common/attr index 42ceab92..d3902346 100644 --- a/common/attr +++ b/common/attr @@ -59,10 +59,10 @@ _acl_setup_ids() j=1 for(i=1; i<1000000 && j<=3;i++){ if (! (i in ids)) { - printf "acl%d=%d;", j, i; + printf "acl%d=%d;", j, i; j++ } - } + } }'` } @@ -101,7 +101,7 @@ _getfacl_filter_id() _acl_ls() { _ls_l -n $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id -} +} # create an ACL with n ACEs in it # @@ -128,7 +128,7 @@ _filter_aces() BEGIN { FS=":" while ( getline 0 ) { - idlist[$1] = $3 + idlist[$1] = $3 } } /^user/ { if ($2 in idlist) sub($2, idlist[$2]); print; next} @@ -180,17 +180,17 @@ _require_attrs() { local args local nsp - + if [ $# -eq 0 ]; then args="user" else args="$*" fi - + [ -n "$ATTR_PROG" ] || _notrun "attr command not found" [ -n "$GETFATTR_PROG" ] || _notrun "getfattr command not found" [ -n "$SETFATTR_PROG" ] || _notrun "setfattr command not found" - + for nsp in $args; do # # Test if chacl is able to write an attribute on the target @@ -204,14 +204,14 @@ _require_attrs() touch $TEST_DIR/syscalltest $SETFATTR_PROG -n "$nsp.xfstests" -v "attr" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1 cat $TEST_DIR/syscalltest.out >> $seqres.full - + if grep -q 'Function not implemented' $TEST_DIR/syscalltest.out; then _notrun "kernel does not support attrs" fi if grep -q 'Operation not supported' $TEST_DIR/syscalltest.out; then _notrun "attr namespace $nsp not supported by this filesystem type: $FSTYP" fi - + rm -f $TEST_DIR/syscalltest.out done } From patchwork Wed Jul 21 05:28:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 12390053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79108C07E9B for ; Wed, 21 Jul 2021 05:28:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6595661208 for ; Wed, 21 Jul 2021 05:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232334AbhGUEsK (ORCPT ); Wed, 21 Jul 2021 00:48:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42774 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232514AbhGUErt (ORCPT ); Wed, 21 Jul 2021 00:47:49 -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 16L53aE9142235; Wed, 21 Jul 2021 01:28:24 -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=MIGzUg9JFo2imBKW37FbdzMtksUozX5A4YinXYWXsSg=; b=X5G1VUZ3lq3oPFxFBqKB5K/4JC82accIuGA2fJmKqkFFS82UwI40DFVfSIAiFeDKJ0/c Xn7X1zSq7gskO5Cs80o3v9uGWRndBXtBsv6cnBxMfNupa3EaJW21sAyY6FQitiF5qBpx ICtFjnXyLPKqHulKoEMhRH8F5CVpoZzuHMymVD+OzF9mwsOguDbhYrFqTol3I4Gu0Tab wVijfsCudUWSw5r/qVYulavssQjerlhliwvh4IwmtvMxrEYmhxGXEOjEP6jDapAfAome ZRkunqxVTPQSoMnYz5rw0ehsFfS2ySkCk8ShOxN2p6LlfVw1z5cGx3FNoNWho5nZK+Sw 4A== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 39xan7bgmh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 01:28:23 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16L5CvHC015122; Wed, 21 Jul 2021 05:28:22 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 39upu89p3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Jul 2021 05:28:22 +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 16L5SJXZ33554818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Jul 2021 05:28:19 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 97C4DAE053; Wed, 21 Jul 2021 05:28:19 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 38352AE04D; Wed, 21 Jul 2021 05:28:19 +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:19 +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 9/9] common/attr: Reduce MAX_ATTRS to leave some overhead for 64K blocksize Date: Wed, 21 Jul 2021 10:58:02 +0530 Message-Id: <1109c811f550f918b8ea8bbe49323f32653b488f.1626844259.git.riteshh@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kl6FvUNOrJnZcLyfwBmFo09GcJNl4VN2 X-Proofpoint-GUID: kl6FvUNOrJnZcLyfwBmFo09GcJNl4VN2 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: fstests@vger.kernel.org Test generic/020 fails for ext4 with 64K blocksize. This adds changes in common/attr for MAX_ATTRS calculations for ext2|ext3|ext4 along with comments explaining the calculations. Suggested-by: Theodore Ts'o Signed-off-by: Ritesh Harjani --- common/attr | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/common/attr b/common/attr index d3902346..35682d7c 100644 --- a/common/attr +++ b/common/attr @@ -256,6 +256,45 @@ case "$FSTYP" in xfs|udf|pvfs2|9p|ceph|nfs) MAX_ATTRS=1000 ;; +ext2|ext3|ext4) + # For 4k blocksizes, most of the attributes have an attr_name of + # "attribute_NN" which is 12, and "value_NN" which is 8. + # But for larger block sizes, we start having extended attributes of the + # form "attribute_NNN" or "attribute_NNNN", and "value_NNN" and + # "value_NNNN", which causes the round(len(..), 4) to jump up by 4 + # bytes. So round_up(len(attr_name, 4)) becomes 16 instead of 12, and + # round_up(len(value, 4)) becomes 12 instead of 8. + # + # For 64K blocksize the calculation becomes + # max_attrs = (block_size - 32) / (16 + 12 + 16) + # or + # max_attrs = (block_size - 32) / 44 + # + # For 4K blocksize:- + # max_attrs = (block_size - 32) / (16 + 8 + 12) + # or + # max_attrs = (block_size - 32) / 36 + # + # Note (for 4K bs) above are exact calculations for attrs of type + # attribute_NN with values of type value_NN. + # With above calculations, for 4k blocksize max_attrs becomes 112. + # This means we can have few attrs of type attribute_NNN with values of + # type value_NNN. To avoid/handle this we need to add extra 4 bytes of + # headroom. + # + # So for 4K, the calculations becomes:- + # max_attrs = (block_size - 32) / (16 + 8 + 12 + 4) + # or + # max_attrs = (block_size - 32) / 40 + # + # Assume max ~1 block of attrs + BLOCK_SIZE=`_get_block_size $TEST_DIR` + if [ $BLOCK_SIZE -le 4096 ]; then + let MAX_ATTRS=$((($BLOCK_SIZE - 32) / (16 + 8 + 12 + 4))) + else + let MAX_ATTRS=$((($BLOCK_SIZE - 32) / (16 + 12 + 16 ))) + fi + ;; *) # Assume max ~1 block of attrs BLOCK_SIZE=`_get_block_size $TEST_DIR`