From patchwork Mon Jun 6 12:40:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Babu R X-Patchwork-Id: 12870301 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 766FFC433EF for ; Mon, 6 Jun 2022 12:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237479AbiFFMlj (ORCPT ); Mon, 6 Jun 2022 08:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237504AbiFFMlg (ORCPT ); Mon, 6 Jun 2022 08:41:36 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E105261446; Mon, 6 Jun 2022 05:41:35 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 256CRpoE022494; Mon, 6 Jun 2022 12:41:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=2/xjn5/xokuNuo095WveON6Bnr/1NNaHur8zSfnU6Kg=; b=Q7TgfRcSFRO7rGIG38lwY+jriGghHIDlg3ld+o329llTPLZK38WwpVZbFpgeTVcqDJWx mFk5WNYcS/Ktxw/J1cgTQjV67TnqPPTn0j2VYJzAA2BmkColKTftbyIHFMWblI55Sozg l0+GYNagSjpWUL8FUU4a0YJT1OxiuLHaOF7urdBbdFSBLv6jKe3tkTEwOQ21UxsZryOk APz9EzlXc03awRWGlmqp0O0zCFBZppAlQ4zuzDWOWDQlnRkSuprX3r4i8hTF7dHGBqBs j6jsNtXYIWuINnyP4wul4NGG+dLllop4+XuAieKOCuFxrYSEnm4+rNzKqjwUv0fgDpOf XA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ggvxmsdtf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:31 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 256CeO0f014072; Mon, 6 Jun 2022 12:41:30 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2106.outbound.protection.outlook.com [104.47.70.106]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gfwu1f0h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PDoeu6tWyUYd3vyxNdsSpyEs3c4SReZmt90YImscXrLj1NSTeluoL/WZ3EaaOBTqN051s9eCJ3eJRW8hxhlgcVtOT2lonATO0KeRAq4nV2OdSVb6b+pgiJA67aGNJQ5CQR8CoFAo0h1GqGq5dQVVW63/CVjSCuOj+I154zq2JV/HGOubobrApRJsaj3dwJ3rVWQCJHUbXQXCw6TYzvr+9sHUGVqCcqy/Ey02i/cGqZWpQdn1xpH88yN93IdFvztxoQAPq61TssEVBdtYSM7osNc7291CU0StEP4dhYyq4/kFR9sskVYOlGl06yqu3A+RgIQwTsDDTq2a2159gADHHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2/xjn5/xokuNuo095WveON6Bnr/1NNaHur8zSfnU6Kg=; b=XM4g5KaYarvYBWBZAFg9gydDzdU/gVx5BQ4tkQrPxnuN+myxOW0IT2tAEwOqYCKpHc8ecI9nkSS2vCNsMNLdtD3vH2hswMNpUTu8GOs4Gk06uL1j8brvvXEdH/WwvdIzwRRCPyKyFgSUx/k4oA2JihpcJPyW4ezRuPRpmNXrMuZgY5MDI10piOOxYShxiM7ZRKl+jblVaqZj600tO8TtPqMyKCG3bgY/KimadOx/KsTSMNs39DozO6kf1OBBRXRgRPQXuXlPAwiYDLRek7F1ateIAtazCtnrYyF6XHaBgp1Y2fiqv34QfDp3un5WzNfTPF7u8CAuOKT7wZOo1WXBXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/xjn5/xokuNuo095WveON6Bnr/1NNaHur8zSfnU6Kg=; b=U3weHxEbdrdO0A1EvHZPQsiXoon0UE4nSsUnIjTzaV645Fk1fVKU3Zy2AVjrE6vhAV5klMu+TMjzn1+c4s8U4cJFw4RKWFTwBMXaa4IcZoDRaImS03I3/eOQnzwNzNNWTZtII8kascHras/N/h8notKFl3gkSfJwYC3NmfywfxA= Received: from SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) by DM6PR10MB2523.namprd10.prod.outlook.com (2603:10b6:5:b2::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Mon, 6 Jun 2022 12:41:23 +0000 Received: from SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62]) by SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62%5]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 12:41:23 +0000 From: Chandan Babu R To: fstests@vger.kernel.org Cc: Chandan Babu R , zlang@kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 1/4] xfs/270: Fix ro mount failure when nrext64 option is enabled Date: Mon, 6 Jun 2022 18:10:58 +0530 Message-Id: <20220606124101.263872-2-chandan.babu@oracle.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220606124101.263872-1-chandan.babu@oracle.com> References: <20220606124101.263872-1-chandan.babu@oracle.com> X-ClientProxiedBy: SG2P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::18) To SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e51d70a1-eae9-4b70-01bd-08da47b9dd3e X-MS-TrafficTypeDiagnostic: DM6PR10MB2523:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EcpKM649T6m3n4eACjTvQ1cspt3J6iIElpzmifTxClUfj1rp7MqphQOPtujoY6MvfaxsjLnRJx9uEC451+hAn32xXbhLEnCo+2lU8V0aUNLppN/GxEMrm2KRqxRXTSrZkpLYnKI5VYZXIUl3DwONjuqoectdYG6tUA4FldZ0QPQnRbBu4riIL9igN8mEv5xM2WKaLb+cCC88XhW77+ctWaHOCdr8G8SRiZu8Srj7jqz/tXwuRN0upITsdudCFsa5MIzU/hKs2K4MNyPCrPEXEpwzH4lm7EMZYXzOlD/fFMPnEbJ6Tk3c4dzLLsdGcNUbSYAR4Hf35ebVEiFZ5t3/nJMMFGoC2gMCOH1HKlT4NiZIiA1qTLNPkHO+MzeEsC/NRD52vyIAlJbYAYPCq/OW4MOyRag6wDLtzsQiXt83+87L8bv0Dp99jsi2o+TDz63ZFvFspGlErrVYQIuNOnASYXpl0Z3fF3+SKnsJqvUFF2dMQfd3S/9/gvfqK2GfVOzTDnK/Vk+ud+EDyBMO62K4XK6fIwhBWUzG/+6M5ubnTEHJQueBeg7uwBl+Nf93vVztc3qhiVk/Ys6H93u7yjY0kHXdUOh1I7hqbus3lUBKVXLTxFFRCpR9x/J1vtw5hwKzvPzeVOZ2DLBmagne3sr6VFn7hMKAOeYeLfUDpSgxTJYEUzBs5rHdRgjZZr3xaI/shVWq2tN0FHcGLwGfQugY4g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR10MB4587.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(6916009)(2616005)(66476007)(66946007)(66556008)(1076003)(316002)(6666004)(6506007)(2906002)(6512007)(83380400001)(52116002)(508600001)(36756003)(8936002)(4326008)(26005)(6486002)(5660300002)(8676002)(38100700002)(38350700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WLxgP6WZWzQj57miVlP9bZaxvQs8Xop9/rXABuMvNSVCgvvk4GKxM+Ph0LOXurQGqksrCDmMDQZEs//LyFRaSLN+YVfGdOcRnGTLpp2UQuZWykOvJ6Tdh0skYYEJiu5v6f30LYsiqpjdyi9Xd1JqBI41SCODufoWHbC6gSXXXaXiohW0voNddwOJ/Z30MvjUyDJN1PKaPmRTZkb8ktr6i1g2CQ4xxMB5NVqap0imjuAAjGJ9tci7uYupEy9t1/LndoU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Apf1kj60TsKtcNeOdv1LQzyPWFUrm/w94Yr2nSx+UbpW7X71PiN9pi564mdgL6AUBcgLZTlf2V5Nvsd/IZGdgif1AJ+vTMjsUyWOpFble+REydAjxGFf9Ew11U9XvmFWkDm5+p2VJbX5MWOMzafJq7jmxTRmzWlUw0Dwvjpj5MGE0S3V+D5OuWHpQlIS9P3Dq4/NPuERKcUn/rxqiEhn8bu4KdW2U0WyFjeArjyrPeB3ze5JulZ8ifgi+G0LnWg63SFkNL9FV6aMzvvQJqCAcgWDDYY8o+N1lPtdp7iYEzeQG4KEtUd597zHuWk1omZnj8Q6g9Y75xT4e1y/hue9JXFNQmOMB87Q7s2I3v7LEsSaUI0Ou04lPxrEKDfVSR3cRjC5rEYFih8EnfABXmMnb+uTeCsshHotJJ83Dn+ULwiKT1rpYbByEcFVpb9E= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e51d70a1-eae9-4b70-01bd-08da47b9dd3e X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4587.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 12:41:23.5977 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eA/stGKpvO/OjvRE5lAUSMmyyFIijCu1NhPbr5iKPitCqhD1KfF6NkErlF/OTeGXhx7nLs4g30rajKBBojOSEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB2523 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-06-06_04:2022-06-02,2022-06-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060058 X-Proofpoint-GUID: 1vhCSPHsL0Z2jpS7oADPEATDItA8Kp-d X-Proofpoint-ORIG-GUID: 1vhCSPHsL0Z2jpS7oADPEATDItA8Kp-d Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org With nrext64 option enabled at run time, the read-only mount performed by the test fails because, 1. mkfs.xfs would have calculated log size based on reflink being enabled. 2. Clearing the reflink ro compat bit causes log size calculations to yield a different value. 3. In the case where nrext64 is enabled, this causes attr reservation to be the largest among all the transaction reservations. 4. This ends up causing XFS to require a larger ondisk log size than that which is available. This commit fixes the problem by setting features_ro_compat to the value obtained by the bitwise-OR of features_ro_compat field with 2^31. Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong --- tests/xfs/270 | 16 ++++++++++++++-- tests/xfs/270.out | 1 - 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/xfs/270 b/tests/xfs/270 index 0ab0c7d8..f3796691 100755 --- a/tests/xfs/270 +++ b/tests/xfs/270 @@ -27,8 +27,20 @@ _scratch_mkfs_xfs >>$seqres.full 2>&1 # set the highest bit of features_ro_compat, use it as an unknown # feature bit. If one day this bit become known feature, please # change this case. -_scratch_xfs_set_metadata_field "features_ro_compat" "$((2**31))" "sb 0" | \ - grep 'features_ro_compat' +ro_compat=$(_scratch_xfs_get_metadata_field "features_ro_compat" "sb 0") +ro_compat=${ro_compat##0x} +ro_compat="16#"${ro_compat} +ro_compat=$(($ro_compat|16#80000000)) +ro_compat=$(_scratch_xfs_set_metadata_field "features_ro_compat" "$ro_compat" \ + "sb 0" | grep 'features_ro_compat') + +ro_compat=${ro_compat##features_ro_compat = 0x} +ro_compat="16#"${ro_compat} +ro_compat=$(($ro_compat&16#80000000)) +if (( $ro_compat != 16#80000000 )); then + echo "Unable to set most significant bit of features_ro_compat" +fi + # rw mount with unknown ro-compat feature should fail echo "rw mount test" diff --git a/tests/xfs/270.out b/tests/xfs/270.out index 0a8b3851..edf4c254 100644 --- a/tests/xfs/270.out +++ b/tests/xfs/270.out @@ -1,5 +1,4 @@ QA output created by 270 -features_ro_compat = 0x80000000 rw mount test ro mount test rw remount test From patchwork Mon Jun 6 12:40:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Babu R X-Patchwork-Id: 12870300 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 97944C433EF for ; Mon, 6 Jun 2022 12:41:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237487AbiFFMlf (ORCPT ); Mon, 6 Jun 2022 08:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237488AbiFFMle (ORCPT ); Mon, 6 Jun 2022 08:41:34 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51B61261B02; Mon, 6 Jun 2022 05:41:33 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2569PRZn003664; Mon, 6 Jun 2022 12:41:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=MrRdM3Jt2+Hg239E5qXcf66D32Om8e9aR8R2bqJfe/M=; b=Bhax4LgR/nyymipVm3beVg0NjqR7waltIrpjDf11dtglUeMzjGOnZTfPxv8pH9NzsiaW W4vZGIGeAP1ELIDLIQATbJHhWQ+TcBaV7LBX5/IB1x/urnasDf4J58w3S1cT3P+2Z8gO TyJmtI6JHR0upB9FsZglWYHlaLF0HD4DQZGeeL/aQoFjQ9qnA4tH2ePPWvJKMn3tD716 8WTuqW4Uh8ePVuvt13P+IFeL4uvOBgnGA9IbUhhHG+YK7IFlulwpy8ygAzwdXnuFkCNJ 4pdelyf0FXvVxzjgzd0mW5sV4+3kL8A1bLidS6g2o+CpQcypfEoFsPSI6Ki3Wr6X+R/0 Yg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ghexe8c0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:29 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 256CeUCS017801; Mon, 6 Jun 2022 12:41:28 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gfwu1fedj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HksVnQ1l4/+BkLPo2j9YWixpnpgOhw7t2UoIoTiji77TEymV4u6E7krLMBeayu6w0iEjK1glsWSM5F6gEdWiWhFtkqGe86mlewZX0AszeWb9d8FuWeNF1qeY64Fof8zsWepwevGpm64DOeQbmiSM7Cxuq8GCiZzb9Hg95UZub4vMB2g14RERbM6SO6x0CIuJ+UDn8gQ3UDXVQkqx3I/Le41XP7/PqYWOJWWgLwNdP10kWdf67LIYL49mTwpGTDKpjC3pyPYMTqAgyOurOWZx5KDvmHdpRG0Qg4FxiNiJ8+wnfw2stgtvyPPWOFBwXIc8yzSnW/ZPLzzm4zj4Bny3Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MrRdM3Jt2+Hg239E5qXcf66D32Om8e9aR8R2bqJfe/M=; b=Xl7VbfSNSar42bDz6dbMJW4Kjbl6uubnvlHnR6TggVhepgwgR7nOfK/EQsuPLgRi3/AcKXiHgQqgKhAea0+wGKXjSC1/66fLGtMacu9cQmMveU5yN2/wN7omF5x4jBnF7C3C9igbMTIugZEV3n2xHpqYgh0VSKzerV3GjJhrgMdyo6SWQvZWY2ppCrZ9Ky2c92paukez2vW7b6JrmGOjazeCuDlZmeNPPIE+NZd8Q0OmLSTdYvdEU1c0ZEdDGdPrb9VqkGeowu0rOhGH244X29qRGrqPgwcJR4+PxDdbhYwBwOjD113Qlsxgqkjq+A8kepcuiPADMnmwfe4QNfnVVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MrRdM3Jt2+Hg239E5qXcf66D32Om8e9aR8R2bqJfe/M=; b=OQcoqm+Pb4zVdNBlbltIfgb4fNpFl4swgriKRmK6LowolF0+6lRRIkwEUUrhu4VA7WF28Y6J/InIR1BophVj8TcTt8RDATo4AbX1OquHAZExpRrb5pEgccn1USTLLVA54N/FS9fy4dueSAQMQk6y73BUiZjQMkvI6nVZfJgkzgk= Received: from SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) by CO1PR10MB4706.namprd10.prod.outlook.com (2603:10b6:303:9d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Mon, 6 Jun 2022 12:41:26 +0000 Received: from SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62]) by SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62%5]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 12:41:26 +0000 From: Chandan Babu R To: fstests@vger.kernel.org Cc: Chandan Babu R , zlang@kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 2/4] common/xfs: Add helper to check if nrext64 option is supported Date: Mon, 6 Jun 2022 18:10:59 +0530 Message-Id: <20220606124101.263872-3-chandan.babu@oracle.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220606124101.263872-1-chandan.babu@oracle.com> References: <20220606124101.263872-1-chandan.babu@oracle.com> X-ClientProxiedBy: SG2P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::18) To SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd09c1f9-cf5f-4269-5029-08da47b9dec7 X-MS-TrafficTypeDiagnostic: CO1PR10MB4706:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yquund3Xt9RZHflWnz0JOmXXiBX0ytPRa3s9jO4LOnqG3Q+abI9X72elM0RgfFoce0o0XqxZefrnuLVYI5PS9CnNUWO48IhN5ISWBYzbHptLvPvNsTCXVn4g3H9mzJ+sFkMtnBrl7A3n5nDcHJMNt76KutmY/RLYOwxaVWxilqs+Hb+kGSxXr8dRfsQhXGLgqZO6ZshMb4wjFz2j0EisDglvtXoPz/nc+tDQkYgLOz5kZVp+EsjCnIoM0WIkAYd/f+EIHJ9eOgRe6bbFwwDAbrF0J28ljuKYKhq/+4SAqGL8d+2BIYeeWns2B5D7gTFtFAHO7JI6GhfpSX3wNEK5M3qw11u0UM6yz0Am3WSrJTJ8H2LDQpMiJnhdBRTHgnwpGhzc0IgWIBPLZ9pBeMNbY6T+EtmEYpGUJiPOotmWU4yl4tYpxV+Y61LyWn7xdIyrobNnOY2bMCdQSF15opWBkiQbVwzGsp3iEBHMGKzc0c81aMsCd3vQUlJN4ytWHvRfOm+fMAucYvCF+wOkVjQ2u5zdOwg2QdOO1C1hapC7aytWaoWDCUJT7SkULC1/AveXWSKpgeAClSY028FAYLmZQyX4cF8MsIVIZn+JQMhBedvXOX5ujZmdQAP2kdJb5PtT0rw/AQ5qtZMV9axf7zSl/BoGQPWb5fhiGodLeXFPDth18vh7edIQ31eSMNEU+WEysx0EmjaMCnW9xRT4Z5/fsRjAjqQVTwRzO95hg1O6adc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR10MB4587.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(8676002)(316002)(86362001)(4744005)(36756003)(2906002)(5660300002)(66946007)(66556008)(66476007)(8936002)(2616005)(26005)(1076003)(186003)(508600001)(6486002)(52116002)(6666004)(6506007)(38100700002)(6512007)(38350700002)(6916009)(83380400001)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gXDURMTZtd/Sg+k5egLrW9IHqWk1RsG9AXeQClxyMJf+xGJzUOu+VZvDE4mzEV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QUPBcLDHG+kvtOD5UxkyunjQdy1fXOOAtTy/RfqbE2yu+jKbNfwOcMILbgM1pJQHcD/wTh06S5mgNadZ5W+lBj4MWBAVA7PD6qyiD5w2FA1EYZjvw7WgYlsacrZ0ven837W5tmD0tcP6WOOl6Nh8GO1+wqoLUtxtsQ0FrJu2kP5ICK8YQj302eQgHU1bw1H+dvyzkOWm52UE/oRbkxB4z0Gn0t4ZppkrGDF2Tq54FV+GgCaJMdXpb2uB7WeTJMn4piLWiERlf5gQQHFsaXZp6BWBcfvilGYS/fy7b2GOu/cadA6jll9MI48VEsqoVzzO6kV4QdRzQl9F7Z70zQY9gpJIOqBWUEt0XvDxvFSkE8+pm8/5pTU2si5ixLufFtfp/I4JPcTlM4tdT23guKJ+HZHkAwfZGQjRAVa7lgKJ/8zDeguhQiyISpoVSHpFYamW31SuNnyHg1NllD8bMr1kRSh7qD4ByLJ8uR5M+bpn7kK/8yu57lhRJEmXG1mV0DeVEwVOGKk1jtuydZBfEp5nN6f3IS5NARRx7l5DvP57n4wqOMFzFSSVUJOOCdN0kNwqMn/KPrNWLz6KFSu4Bqu+QsgEuBSlpBGZSxBTE4UeZiVQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd09c1f9-cf5f-4269-5029-08da47b9dec7 X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4587.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 12:41:26.1596 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zq/Rq01kSGr536yOkgCPfPcdus1snni1MLh/tZNCTHf3hFH2f/2WRdd41p4y6PpzGc63D/0NmjqOJyaAkUCwiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4706 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-06-06_04:2022-06-02,2022-06-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060058 X-Proofpoint-GUID: gidetA6PQNUmSVWEJ44rYMgOwxGIn5eS X-Proofpoint-ORIG-GUID: gidetA6PQNUmSVWEJ44rYMgOwxGIn5eS Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This commit adds a new helper to allow tests to check if xfsprogs and xfs kernel module support nrext64 option. Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong --- common/xfs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/xfs b/common/xfs index 2123a4ab..dca7af57 100644 --- a/common/xfs +++ b/common/xfs @@ -1328,3 +1328,16 @@ _xfs_filter_mkfs() print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n"; }' } + +_require_scratch_xfs_nrext64() +{ + _require_scratch + + _scratch_mkfs -i nrext64=1 &>/dev/null || \ + _notrun "mkfs.xfs doesn't support nrext64 feature" + _try_scratch_mount || \ + _notrun "kernel doesn't support xfs nrext64 feature" + $XFS_INFO_PROG "$SCRATCH_MNT" | grep -q -w "nrext64=1" || \ + _notrun "nrext64 feature not advertised on mount?" + _scratch_unmount +} From patchwork Mon Jun 6 12:41:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Babu R X-Patchwork-Id: 12870302 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 6773FCCA47F for ; Mon, 6 Jun 2022 12:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237504AbiFFMlk (ORCPT ); Mon, 6 Jun 2022 08:41:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237513AbiFFMli (ORCPT ); Mon, 6 Jun 2022 08:41:38 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7854E2629FF; Mon, 6 Jun 2022 05:41:37 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 256CJJ6U006786; Mon, 6 Jun 2022 12:41:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=qEp1cS1211Yqfw8vVivFjIL16Z1PtVt29e9phsV0jO4=; b=f70ZRLPce8Wzb9Dkh+MfOW+b1djNThfFX1NC0nGS3MSZrK25JyndShF5182L0VPjjwEB toPziSr7hWmTPLhwfkqlsSLCkRhH/921ehWX7hJ1pQdOilc4YxHkccoPdPctzcp5jUOG YqQngy5t1I36U9JJAGHVAMuYzoL0O6oh6/v6haXC6N4cMC/nteXnEQwJqP7WaXFjkUdW 3Z9GEmp8MXhrzkTJEgs90NnP3MT0E1IzFt4NcguwsliIB8pBRq2+SNYLsz0GcEnGGi+w zDNF3viwcC0aMksggTJUZVIN8Hl4zAha3USzJ6HjbgmS+MsDT2Wj+RGDYJjpYv5D+8Zx bw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ggvxmsdtg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:32 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 256CeORk014033; Mon, 6 Jun 2022 12:41:31 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gfwu1f0mk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EcJtV6pdTR32wQ6K8X+hkjcDXxhgsK5wA2sOLNAqxBVmj+yU4QGreCWEqeEpD+uve/eYUqMY2NR2O7QImuGQcr30HBlQK2XSiQFBQZRHP2wJZdqVW4A1RIeysVxjvpNhQJRBgTZK+jNdPLNuYu/zh6jSZeLk4uEPbz1lIxaRX/H/fmnqOc+SRy66bN65PkY9riYGLEpgfNYatsaMrqGDp53Jwpd1AyOyw4yGByCsbPgpTsB8LsQlQrqgghmccqq3AZMUjDUxHKl6B5XpSh65o7CternwUE0E50ay2nhTJ+UJRC7MnQz7tF6S6JBgk3yb8ZxyrIOKSgYcHu51fWrTmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qEp1cS1211Yqfw8vVivFjIL16Z1PtVt29e9phsV0jO4=; b=hJrS9W1AYt84+//GFGljMCGa0iLmKJDidukVbim4gaSg8+ElkU+OfIIYdyAOUV904BhXnEPm/0HfbkQs37QdScnerhTPQDbT1G7aGM8QXWJrLB72TXk9fQ/au04IBffl5ZGe0IEQaJEHWyXbPr1saOmyaAQ1Yy/CjT3+woe62zFcYEVuzMvyiK4LN00VuaKj+Hzmy0cH3iLxrSDCtA7QoDWV33VNW+I+gbwb4INE1z+Y6gTKE88ei1yny6frSme9X0eH+U4VvtaOp7V/gS7xv3ZmwlaB/L5M+0XHMpXGoDJexnDxksqUm44qyIjEEFxB+gbXSYarB63giBPeBpj2SQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qEp1cS1211Yqfw8vVivFjIL16Z1PtVt29e9phsV0jO4=; b=bKZxS4jvW+pJokMrkvxm47pvHsCroI/e3seyRlMRVnwAOcgG1k5OpfxK6vx88/PRc+SXxKjzzX69L8NukmnAtmEIZHhwGpuCzCxjgvs3vyOAizOi1IPgEeTpruf5F2sTED3Igjred1c+o33NAt3PcZXpn6oypNeTBiaVcR/s5es= Received: from SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) by CO1PR10MB4706.namprd10.prod.outlook.com (2603:10b6:303:9d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Mon, 6 Jun 2022 12:41:28 +0000 Received: from SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62]) by SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62%5]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 12:41:28 +0000 From: Chandan Babu R To: fstests@vger.kernel.org Cc: Chandan Babu R , zlang@kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 3/4] xfs/547: Verify that the correct inode extent counters are updated with/without nrext64 Date: Mon, 6 Jun 2022 18:11:00 +0530 Message-Id: <20220606124101.263872-4-chandan.babu@oracle.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220606124101.263872-1-chandan.babu@oracle.com> References: <20220606124101.263872-1-chandan.babu@oracle.com> X-ClientProxiedBy: SG2P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::18) To SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 533d3e12-8adb-4529-c7c0-08da47b9e041 X-MS-TrafficTypeDiagnostic: CO1PR10MB4706:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +k3/iF2qu9zfDjYKk04Rp6p9Je6W1Bxr5QEXtOsjJGboctdCjIalhA/vsTBoVRBV2yExLuIzzOe5iT7WhECrFFZ46PH1qUFwQFRerthP8k38rL+YDtIUSg8dzv0f0C4VFcgCEz+u9+ys0GBnwKq+I7q2ju0whbIj8DXjetDi9b3MOva23fB0TkJH6B906D/sSYrgV7aMFSmI696nzegPAB7tit+xSxaQySZHaPycfB+1jN+BBWwdfwceGXy2ipdfnjN0k9aNqYKtPOngaOzIKz5Cn2eeW7jUN6Xnfy1rZzdG900uXS0E8bO7GIFd8ubcNZQRQEOXHZawX65x2gTdAepMS0nb2qLM6jRzVP73hhaP8fjs1Uxexpk6wgMrIUkGLcmfwu9y1H2iFZ+fUaUAw4WuL302Dhshnu/aecA98Eb1/a1Sb7X38y14zjMWAreLezH8mv9rU0ipY32Py0SfA6R00bTX29dfZsN3kv0Pjr88K23ZWvXUlByRlekbY/K+uO3xfqtNbqtEjgPLQiN+GrMisxgSAm28jbbWVnd7eqIAbtUr62UruOxiV2xKja1uwWxVwSoLFvSh/P0m7y4pfJ6NaV2fHOxofabqFXaYO+MUHYlsj1TaWXnraeb2Vh56YMvXuqPl3NcxguWEjXyVha78FF9mpPu55VZc05r3HNbyElOocFMdEoih3fYj5ThDClX1MYfhnaC4S0NrWiKdBg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR10MB4587.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(8676002)(316002)(86362001)(36756003)(2906002)(5660300002)(66946007)(66556008)(66476007)(8936002)(2616005)(15650500001)(26005)(1076003)(186003)(508600001)(6486002)(52116002)(6666004)(6506007)(38100700002)(6512007)(38350700002)(6916009)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6wWltN6F2n0JwlLLdRbp2WrvwgulXTQFC84YlqzRGY9amMKIlvn5VZuYk6mKJdoz8LTfKb83HZ9qmLGky0XipV762JlcLSzDC7Hq+7Fq6yHWTlP/egOnPt3RddtDoAUyBcCzkFpMwyOq/67SgUjflN6uJmM0dSDLcsUd7arCufJo2bEY0INxMdtEV4GvJJ12/pIqiYOEz6uKg0lcosGvAIdi/782AwytJOmDVUPdL8m2X16i1n2vXDCC5sJoBfaVnDBl+vp7xBu9sPM9zosKXlPzBfoxI42U2ryXxHCNp0XiuJLRO8LacHzibanqSJB3j6HA9WqiM7E5NOIcC7a29P0/kaW8LHhIOGHSPmdtBR6fy2u5cVGlxL5i1Rsfe1432k8N/v55pzn61bKLK2329Bqshe8XNR7VwiyG4a3nEsxU1+Y8atzLkRj14jFrBq56ZbQhx9jhnQWDIgLEiaFdljqPCgn491dC6McngyJSiUfqjL+aO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uKJi9RXFeuGijlDwydEL4Xgoe7cfiUgD4TSKYcrtzYvkWuqcT+61FoOKRfCJbTCjNsnto31vMJVefDyg7oaz3BtEs4EzZElzP8VMljNlkR2U9x3rgLw+tw42dKv05dyzdUxTjdLwJjkC2VKXzhd6lSHbewfPob3NvYVpQxIz5ZGfsz4n7Zfj667w6XUDpkc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 533d3e12-8adb-4529-c7c0-08da47b9e041 X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4587.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 12:41:28.6087 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UjP7sO1IuT/Kt8KabwDV4uN2FGtE8pqQU/CJDn2Jp3gW7+zgcaQevIwM6stgnpRxaB1NsUo+3k30pZDlsGbMjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4706 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-06-06_04:2022-06-02,2022-06-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060058 X-Proofpoint-GUID: CLUYqYlDMHp3ec2-BCmMByUqfhMEOvrT X-Proofpoint-ORIG-GUID: CLUYqYlDMHp3ec2-BCmMByUqfhMEOvrT Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This commit adds a new test to verify if the correct inode extent counter fields are updated with/without nrext64 mkfs option. Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong --- tests/xfs/547 | 91 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/547.out | 13 +++++++ 2 files changed, 104 insertions(+) create mode 100755 tests/xfs/547 create mode 100644 tests/xfs/547.out diff --git a/tests/xfs/547 b/tests/xfs/547 new file mode 100755 index 00000000..d5137ca7 --- /dev/null +++ b/tests/xfs/547 @@ -0,0 +1,91 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test 547 +# +# Verify that correct inode extent count fields are populated with and without +# nrext64 feature. +# +. ./common/preamble +_begin_fstest auto quick metadata + +# Import common functions. +. ./common/filter +. ./common/attr +. ./common/inject +. ./common/populate + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_scratch_xfs_nrext64 +_require_attrs +_require_xfs_debug +_require_test_program "punch-alternating" +_require_xfs_io_error_injection "bmap_alloc_minlen_extent" + +for nrext64 in 0 1; do + echo "* Verify extent counter fields with nrext64=${nrext64} option" + + _scratch_mkfs -i nrext64=${nrext64} -d size=$((512 * 1024 * 1024)) \ + >> $seqres.full + _scratch_mount >> $seqres.full + + bsize=$(_get_file_block_size $SCRATCH_MNT) + + testfile=$SCRATCH_MNT/testfile + + nr_blks=20 + + echo "Add blocks to test file's data fork" + $XFS_IO_PROG -f -c "pwrite 0 $((nr_blks * bsize))" $testfile \ + >> $seqres.full + $here/src/punch-alternating $testfile + + echo "Consume free space" + fillerdir=$SCRATCH_MNT/fillerdir + nr_free_blks=$(stat -f -c '%f' $SCRATCH_MNT) + nr_free_blks=$((nr_free_blks * 90 / 100)) + + _fill_fs $((bsize * nr_free_blks)) $fillerdir $bsize 0 \ + >> $seqres.full 2>&1 + + echo "Create fragmented filesystem" + for dentry in $(ls -1 $fillerdir/); do + $here/src/punch-alternating $fillerdir/$dentry >> $seqres.full + done + + echo "Inject bmap_alloc_minlen_extent error tag" + _scratch_inject_error bmap_alloc_minlen_extent 1 + + echo "Add blocks to test file's attr fork" + attr_len=255 + nr_attrs=$((nr_blks * bsize / attr_len)) + for i in $(seq 1 $nr_attrs); do + attr="$(printf "trusted.%0247d" $i)" + $SETFATTR_PROG -n "$attr" $testfile >> $seqres.full 2>&1 + [[ $? != 0 ]] && break + done + + testino=$(stat -c '%i' $testfile) + + _scratch_unmount >> $seqres.full + + dcnt=$(_scratch_xfs_get_metadata_field core.nextents "inode $testino") + acnt=$(_scratch_xfs_get_metadata_field core.naextents "inode $testino") + + if (( $dcnt != 10 )); then + echo "Invalid data fork extent count: $dextcnt" + exit 1 + fi + + if (( $acnt < 10 )); then + echo "Invalid attr fork extent count: $aextcnt" + exit 1 + fi +done + +# success, all done +status=0 +exit diff --git a/tests/xfs/547.out b/tests/xfs/547.out new file mode 100644 index 00000000..49fcc3c2 --- /dev/null +++ b/tests/xfs/547.out @@ -0,0 +1,13 @@ +QA output created by 547 +* Verify extent counter fields with nrext64=0 option +Add blocks to test file's data fork +Consume free space +Create fragmented filesystem +Inject bmap_alloc_minlen_extent error tag +Add blocks to test file's attr fork +* Verify extent counter fields with nrext64=1 option +Add blocks to test file's data fork +Consume free space +Create fragmented filesystem +Inject bmap_alloc_minlen_extent error tag +Add blocks to test file's attr fork From patchwork Mon Jun 6 12:41:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Babu R X-Patchwork-Id: 12870303 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 8DF7DCCA473 for ; Mon, 6 Jun 2022 12:41:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237519AbiFFMll (ORCPT ); Mon, 6 Jun 2022 08:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237517AbiFFMlj (ORCPT ); Mon, 6 Jun 2022 08:41:39 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68A5262AC1; Mon, 6 Jun 2022 05:41:37 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 256CJIgx006767; Mon, 6 Jun 2022 12:41:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=i5xR3HvblMTwQOnZP+WU9E+ANOj4jXHCKWg+PwsBGcQ=; b=b/eguF4qmBKmNY/WD8bPuOdo//gD37jVFHKxhl29KgSg+p1bnL4vblzxjng1mIXK5FAU 8Q5HnznEprT/1UeWetYBKmQwHmoxCQMlgaaEcUt/j9Ds1nrUrNcdV11GgifaPyZ+S1kf jxUfpURAkj1dSyBMKq/xBBJRm+eJayxP76Ga5I+EE66npZq3MiWWGeBufmNDo/aUlpP2 VBiC9VrXjDbqKR3WdezGpv2rmSy/lBF8k1G5MQdgTn91YzSc2ICs01QKpmxTwknBOLrb iCBRnh8AabBDsWYetX2iG0PL7eViHTuWVXitYM2EvHT4euoQ+fngguj4/bNkPmKjDDxH hA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ggvxmsdtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:34 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 256CeODi014050; Mon, 6 Jun 2022 12:41:33 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gfwu1f0p5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 12:41:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hzc3Ef/T5kGEQvPuQ0fK2OpLrZXkRJ36Ycu/FTkZ0Vlo1RTrRccusa6b6LYNKtN0rjIcS3Btb1Z7np0vxJHO7Iy0DsUeUpehL/9oex4A0ZJ26Qx0kNWhQYJROfi72YBBuiVk//dCVQknnPEKShyDp5wYaiUXe7Y21OOBMxU8jeu+A7Heo5lmKUladAvV+EmjDfeRJ9+EAW0IU1+prQv/aGJEe5lKeUW+Spu2BWiPNQ7ff6kiqov+xcK6FZoT6ult7kR31Lkr8J2biCbS/mqdXlsVuFBWMvozjJOAFLudA8+33kayiDAT+qn9HsM/fznP014QuHJ18uEWSjlTqS+iRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i5xR3HvblMTwQOnZP+WU9E+ANOj4jXHCKWg+PwsBGcQ=; b=kjH3YkMhRGaUeYAxmZAhugwHbwZBSMt/2C1wOV60f0kUU5wjjdicr46Za7KPboAmcGF7FLFTkj4WDBXaeOcSel15eQnQRMm8E9NfzrIdKmlarSR2M+bdUTODFHE/ls9S9XDxuvNZQkP7WlixHe4ch/BO++l4ujrDNhzAgLOXxC++YtVqaO0EWLGSEv5uJBa6F1h8GWD1bNUA+Bf3id75GspMBcTiEIEBLURDAz4sfadZah3wMGbAyY4Ag7PNsbq+ixWcLMJ9K3UtS+Bis9c/RyjsJ179HLWNz1otb1rthFJMIy3Ka2o5FM3UQdgGq5P5PYBoFZ9FSRfBQLazrb/oHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i5xR3HvblMTwQOnZP+WU9E+ANOj4jXHCKWg+PwsBGcQ=; b=TEo5pVDtE2WHIah2K3AugAcD8+L6MhyOMhG/3BeebHwp1fzj+XQC2B1HQUnqmGLmRf6Ji70yPzaV0oFlFdCfTuOEylQQnyVIv84uGjzaul0L+RrkJ1FZMKCCaim1Q26rR7d0D01lcETkIP17XrviZS/FnrqLz2lo351DJlG3m7E= Received: from SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) by CO1PR10MB4706.namprd10.prod.outlook.com (2603:10b6:303:9d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Mon, 6 Jun 2022 12:41:31 +0000 Received: from SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62]) by SA2PR10MB4587.namprd10.prod.outlook.com ([fe80::5476:49e9:e3eb:e62%5]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 12:41:31 +0000 From: Chandan Babu R To: fstests@vger.kernel.org Cc: Chandan Babu R , zlang@kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH 4/4] xfs/548: Verify correctness of upgrading an fs to support large extent counters Date: Mon, 6 Jun 2022 18:11:01 +0530 Message-Id: <20220606124101.263872-5-chandan.babu@oracle.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220606124101.263872-1-chandan.babu@oracle.com> References: <20220606124101.263872-1-chandan.babu@oracle.com> X-ClientProxiedBy: SG2P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::18) To SA2PR10MB4587.namprd10.prod.outlook.com (2603:10b6:806:114::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b89b0561-3f34-4a2d-01c0-08da47b9e1c4 X-MS-TrafficTypeDiagnostic: CO1PR10MB4706:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C9AdDPrFQzBV4XnWtIEx8xRy7Vkn+0Mznd2nL3D0loo5z3e7zivWITNVP2JZXY5CEYJY0FLhNAojP4xfIoD7ITxyX4AFnMRK7pb1W45lJFoUiO9fDHATz+FHa4hGbS2D8FGiRsWzcPPBfDgTS4khYiyE1skd0T2nPBzrrNO4lQ2ydGvUjPgK0QHhKD3+0kmLw2VOE6HT9C8NnmfgESlyx+9olNFQiiv6kOjHna1wIazX2HlL4R3vtt4Wgezs6SD0PJG1QK32Ry7WfP+ZnyXxZ3G/qKYDvsLTkwDoO+iH67P/waI83uQT7R2odESi+S1lkS9a2qzTBBvaz3nZW4mT2QKQIeV0VzARgCixz/Ve00+X2sFe1J4gHXJst3XRgbdyKyY7b+dEcxsuwSUNmp9N4wOvzwYFdAIK+AfRIy8rvUOmnQY4W5D5U9GK3W0tvv+YOzGG7msZsEuZ/9ph6pHqmzZIfbhMl+05gWt68pWZZizy8G63ppJ0zUPfqVOoLeJJjzw8l4TYOm75CIQ4R2i90TtpOL+ru8/sqVtTvOljWQb3KNHW4Qu7ZyzZ3iEa2uD2Sbf6/2X6lQcjTdNEvPHyz7BfZe/NDHeVc51GP4GON0w1MqaXNuxQbVLbQv01lbTGjyKtQKH4Bx7Pifz6cJUrmEZealID5uhNV328ovy0kXJ7AHWXgqYKNvbNHLflqivwPnWJxywl0EbbkB+bKejlAQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR10MB4587.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(8676002)(316002)(86362001)(36756003)(2906002)(5660300002)(66946007)(66556008)(66476007)(8936002)(2616005)(15650500001)(26005)(1076003)(186003)(508600001)(6486002)(52116002)(6666004)(6506007)(38100700002)(6512007)(38350700002)(6916009)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wluwUeFwhhOeB7Vrz3Ply/1frj0hdsRYfTBowP5ooCuM3UMVJy6CNNR+LELTVHvqYN8b8PrFA461Z5eKv9iDhBCSbK1vx+owpFp6keR2kzThTehav1oOEa37dpGYH6egwcTD7vdAlN1ZfL0IhWRyadCVDQNVKXWtF+p2AFC6tjxinIuBdQropvF+GTRpwmkhLNFBsP3d94grcjx0M+522zMSK/KA21amjFv7nRTZlvpibrO8vFCYFMDKx9NlKByiYUF4GzzN9z1iWHyl640okolm5WL8sYnPUuSfcAGd5o/NYxt+GEHfL1rLEo7aHuqMKsgIthewAg8hgh5a1Kz/Q6Aj35d/ATD0bNtqRgiqNCnqPTMKzIuNkEF2zg3O2fo02/14jZ1JTl9XedOv/PxDi7tcCaKIw8sNxFYdULbl+bFiOEWKjchTQ3CG9LejE0XpnOtrQ+W7CpOBvxUvx5HCSWlJI8yqCehpL2DNI9GZKo1z/4WKWx6AYp4lUvcLyAa0EXOP6z0g32ZvhpzwFzOl3uXOSI4KU3foYNN5Y1Anj0z/sY94YvFhdkg8s8rdUAG5xlIW63rifC6gXbAT6aQuZuicyFq+D6WsaOI1F2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Z7Iiby2v2z29lUDNIIRWcmTqhD9QAhi65M4JllnAE0t4AAixrfFbt+UQr13VBJfF7fasREJdMuoXOaQjmLILA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b89b0561-3f34-4a2d-01c0-08da47b9e1c4 X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4587.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 12:41:31.1255 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ixx5cYQYZg5ZhI44e4IJZVvZVBdXI9VtWY5LTHAKUCftyrj/Hc/3ivikjhHCI7+fqf72vzElmmHIqZ0NQJzohw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4706 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-06-06_04:2022-06-02,2022-06-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 mlxscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060058 X-Proofpoint-GUID: KacFECck7cWh2ASaqsTJ9FOBgQwZmskT X-Proofpoint-ORIG-GUID: KacFECck7cWh2ASaqsTJ9FOBgQwZmskT Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org This commit adds a test to verify upgrade of an existing V5 filesystem to support large extent counters. Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong --- tests/xfs/548 | 109 ++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/548.out | 12 +++++ 2 files changed, 121 insertions(+) create mode 100755 tests/xfs/548 create mode 100644 tests/xfs/548.out diff --git a/tests/xfs/548 b/tests/xfs/548 new file mode 100755 index 00000000..6c577584 --- /dev/null +++ b/tests/xfs/548 @@ -0,0 +1,109 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 Oracle. All Rights Reserved. +# +# FS QA Test 548 +# +# Test to verify upgrade of an existing V5 filesystem to support large extent +# counters. +# +. ./common/preamble +_begin_fstest auto quick metadata + +# Import common functions. +. ./common/filter +. ./common/attr +. ./common/inject +. ./common/populate + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_scratch_xfs_nrext64 +_require_attrs +_require_xfs_debug +_require_test_program "punch-alternating" +_require_xfs_io_error_injection "bmap_alloc_minlen_extent" + +_scratch_mkfs -d size=$((512 * 1024 * 1024)) >> $seqres.full +_scratch_mount >> $seqres.full + +bsize=$(_get_file_block_size $SCRATCH_MNT) + +testfile=$SCRATCH_MNT/testfile + +nr_blks=20 + +echo "Add blocks to file's data fork" +$XFS_IO_PROG -f -c "pwrite 0 $((nr_blks * bsize))" $testfile \ + >> $seqres.full +$here/src/punch-alternating $testfile + +echo "Consume free space" +fillerdir=$SCRATCH_MNT/fillerdir +nr_free_blks=$(stat -f -c '%f' $SCRATCH_MNT) +nr_free_blks=$((nr_free_blks * 90 / 100)) + +_fill_fs $((bsize * nr_free_blks)) $fillerdir $bsize 0 \ + >> $seqres.full 2>&1 + +echo "Create fragmented filesystem" +for dentry in $(ls -1 $fillerdir/); do + $here/src/punch-alternating $fillerdir/$dentry >> $seqres.full +done + +echo "Inject bmap_alloc_minlen_extent error tag" +_scratch_inject_error bmap_alloc_minlen_extent 1 + +echo "Add blocks to file's attr fork" +nr_blks=10 +attr_len=255 +nr_attrs=$((nr_blks * bsize / attr_len)) +for i in $(seq 1 $nr_attrs); do + attr="$(printf "trusted.%0247d" $i)" + $SETFATTR_PROG -n "$attr" $testfile >> $seqres.full 2>&1 + [[ $? != 0 ]] && break +done + +testino=$(stat -c '%i' $testfile) + +echo "Unmount filesystem" +_scratch_unmount >> $seqres.full + +orig_dcnt=$(_scratch_xfs_get_metadata_field core.nextents "inode $testino") +orig_acnt=$(_scratch_xfs_get_metadata_field core.naextents "inode $testino") + +echo "Upgrade filesystem to support large extent counters" +_scratch_xfs_admin -O nrext64=1 >> $seqres.full 2>&1 +if [[ $? != 0 ]]; then + _notrun "Filesystem geometry is not suitable for upgrading" +fi + + +echo "Mount filesystem" +_scratch_mount >> $seqres.full + +echo "Modify inode core" +touch $testfile + +echo "Unmount filesystem" +_scratch_unmount >> $seqres.full + +dcnt=$(_scratch_xfs_get_metadata_field core.nextents "inode $testino") +acnt=$(_scratch_xfs_get_metadata_field core.naextents "inode $testino") + +echo "Verify inode extent counter values after fs upgrade" + +if [[ $orig_dcnt != $dcnt ]]; then + echo "Corrupt data extent counter" + exit 1 +fi + +if [[ $orig_acnt != $acnt ]]; then + echo "Corrupt attr extent counter" + exit 1 +fi + +# success, all done +status=0 +exit diff --git a/tests/xfs/548.out b/tests/xfs/548.out new file mode 100644 index 00000000..19a7f907 --- /dev/null +++ b/tests/xfs/548.out @@ -0,0 +1,12 @@ +QA output created by 548 +Add blocks to file's data fork +Consume free space +Create fragmented filesystem +Inject bmap_alloc_minlen_extent error tag +Add blocks to file's attr fork +Unmount filesystem +Upgrade filesystem to support large extent counters +Mount filesystem +Modify inode core +Unmount filesystem +Verify inode extent counter values after fs upgrade