Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3732085imw; Thu, 7 Jul 2022 06:49:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uicc1UYNCP6fN55pjSTpiFxW3It5LcW9J3ptdagk3f1lzJr5Y+gibUw7Y5On7L8TrqrEZY X-Received: by 2002:a05:6402:b9b:b0:43a:5aac:ed6 with SMTP id cf27-20020a0564020b9b00b0043a5aac0ed6mr28912736edb.131.1657201748193; Thu, 07 Jul 2022 06:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657201748; cv=none; d=google.com; s=arc-20160816; b=emntdDK5xrGVlKcwf3O8LV/XBkAJgbWmgpBRx0HBYIJ98TuVlcRRYBSG5QVevWhfyW c+0nGpP0MjzZUvgeOvh/0m+IHHM9ckkaZNoEExBvh8DXg/H5Pk5uuffAOKsuWouEH2Ef Z4FFqkMT0uAt8zI0duVoE1bijmCbBNfXbyYAzrfT6rAFcPllB7nMRBT8Mmkvd1E0bTJL ZhJaDWif/jARIKP01P+iJ0eAePvkaJf0AqILxhvDN1+1DJzvIXXA2voGzFeupAhE5RmD 8RvHQavyZ3846DGHfvWQxvPhHKnkhMRra7WVqNTQXoJfsPF4sPqW0LTfNeTsvYGMyxWl bfXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9sG8u3fA4JNcr6caIpEHYbbdxa/31X7MWoCWYhE6dNM=; b=tAF1gk+DCCAl/w/m02eas9HADKInZo3lIlM+mN3mCcBDesm9O5qm9d08G+Ym3QcWha sUPQYiyCDPavKMg9oXzZ61hvB61qM5yK0N0JKk4JMRj1cs1jKv5PfB4yz/mxCdSdZeqJ f8QozQnc31y5+vUwI09GoSimslaoOFC4bUxrPc2lQ0Ccg3JFz/zFpwN5eYQLUNB8FVzF WUO+o2xCRO2zFbEJgcBPHjvo0pIEjNQARlrHs0bWJ4lfMwz/g5WT8STmUEIX1N+Rlz56 BOOX4aV4wc7w7EyYV0O110wUKDCiaUtguOoBOE/39vVH2K3jkLRlW5x2eX+JmlxomUz0 IzCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a170906044900b0072694ef6015si26521373eja.233.2022.07.07.06.48.37; Thu, 07 Jul 2022 06:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234864AbiGGNqw (ORCPT + 99 others); Thu, 7 Jul 2022 09:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235663AbiGGNqu (ORCPT ); Thu, 7 Jul 2022 09:46:50 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C17C61A056; Thu, 7 Jul 2022 06:46:49 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LdyNj6RCXz1DDH7; Thu, 7 Jul 2022 21:45:57 +0800 (CST) Received: from kwepemm600010.china.huawei.com (7.193.23.86) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 7 Jul 2022 21:46:47 +0800 Received: from huawei.com (10.175.127.227) by kwepemm600010.china.huawei.com (7.193.23.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 7 Jul 2022 21:46:46 +0800 From: Sun Ke To: CC: , , Subject: [PATCH 1/2] ext4/057: resize fs after resize_inode without e2fsck Date: Thu, 7 Jul 2022 21:59:16 +0800 Message-ID: <20220707135917.373342-2-sunke32@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220707135917.373342-1-sunke32@huawei.com> References: <20220707135917.373342-1-sunke32@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600010.china.huawei.com (7.193.23.86) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Forget to run requested e2fsck after resize_inode, then resize fs, it will trigger off null pointer. Regression test for commit b55c3cd102a6 ext4: add reserved GDT blocks check Signed-off-by: Sun Ke --- tests/ext4/057 | 41 +++++++++++++++++++++++++++++++++++++++++ tests/ext4/057.out | 2 ++ 2 files changed, 43 insertions(+) create mode 100755 tests/ext4/057 create mode 100644 tests/ext4/057.out diff --git a/tests/ext4/057 b/tests/ext4/057 new file mode 100755 index 00000000..dacc14be --- /dev/null +++ b/tests/ext4/057 @@ -0,0 +1,41 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2022 HUAWEI. All Rights Reserved. +# +# FS QA Test 057 +# +# Forget to run requested e2fsck after resize_inode, then resize fs, +# it will trigger off null pointer. +# +# Regression test for commit +# b55c3cd102a6 ext4: add reserved GDT blocks check +# +. ./common/preamble +_begin_fstest auto + +# real QA test starts here + +# Modify as appropriate. +_supported_fs ext4 +_require_scratch +_require_command "$TUNE2FS_PROG" tune2fs +_require_command "$RESIZE2FS_PROG" resize2 + + +# set fs size 3G +dev_size=$((3 * 1024 * 1024 * 1024)) +_scratch_mkfs_sized $dev_size >/dev/null 2>&1 + +# forget to run requested e2fsck after resize_inode +$TUNE2FS_PROG -O ^resize_inode $SCRATCH_DEV >/dev/null 2>&1 + +_scratch_mount + +# resize fs from 3G to 8G +$RESIZE2FS_PROG $SCRATCH_DEV 8G >/dev/null 2>&1 + +echo "Silence is golden" + +# success, all done +status=0 +exit diff --git a/tests/ext4/057.out b/tests/ext4/057.out new file mode 100644 index 00000000..185023c7 --- /dev/null +++ b/tests/ext4/057.out @@ -0,0 +1,2 @@ +QA output created by 057 +Silence is golden -- 2.13.6