Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp252185imn; Wed, 27 Jul 2022 05:24:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vEcayS489rzZCCVwaGj2jVmSnt5h3Zm73oS/MgjMIjy7fH953rt82thAbTD4c1Eaz8Dweb X-Received: by 2002:a17:907:9706:b0:72b:4b0d:86a2 with SMTP id jg6-20020a170907970600b0072b4b0d86a2mr16768658ejc.242.1658924667380; Wed, 27 Jul 2022 05:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658924667; cv=none; d=google.com; s=arc-20160816; b=DTahpl+M8NPBSXIUOq0K2u9btL2RZ4ga52I6DQmvk9EF9/ZImRSJqDhAOrGLn6ngCj rnAqvy7jIO9v+xHIA+eVY8StaBAL7N1PR09aW6H4M2gNhvYjEwcaRgOyzWyAMZOYzbG6 +mukYpZ2hDun+RDyPpLCgGYGqzyqEgGNIZaCX9yfgnByTwFmBO+4sHC8SyV9VAMyRp+N fT/x521ZBtdIu23L+7YOaRGwsm2PNYfNzcAFw1ZDGsnV0v+snima5T0oJNHwGsrjK01j vfi5d3qzbU9/RJpWraiCMkZXjS4KSLqGmXadiXi0s+Jo2rjja9qtv+PLANGGwkP9O0H2 iS2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EPqkkW3iptkB99T8sdQCA3opbpO1omuXsI7/ALoEDz8=; b=VFi9O+STIhANogaxpAAjrNuN392W8o06aB/2XpUApp/kUpkwCzeTDC4FK4ydXMK6ho 4mmqDv5hRXScy/7ZF+rapMDmwUfpRfODj5Tz79AHRdM20Vhm6nTO/kD4QBDTR8LkCLmp k3ip1YnOyisxgpzSlInUEMmrpcurqbrCHCaZtHgHpf/gQlmGFI4nM3xTb3l3adE9PzGL FJQ82Hr2uvPk3UYnRuE5uIdYjEYwB0yQ+ezI3EwPtIR3SmA+mXqolpjas2o0mu8/yHq+ GHaSfcU0JMk7lICRDfwKePMOpq6O9Ez+HnLMvWwAyPWe1aVbUejIFAAPK57lZa/5k4vH 3TLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ikoFXbOr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020aa7c704000000b0043cc90dc170si516565edq.96.2022.07.27.05.23.55; Wed, 27 Jul 2022 05:24:27 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ikoFXbOr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232430AbiG0MHq (ORCPT + 99 others); Wed, 27 Jul 2022 08:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231793AbiG0MHp (ORCPT ); Wed, 27 Jul 2022 08:07:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 849651B782 for ; Wed, 27 Jul 2022 05:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658923660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EPqkkW3iptkB99T8sdQCA3opbpO1omuXsI7/ALoEDz8=; b=ikoFXbOrCEFXK+xueRJYGADSD32fa1JGiXe1ME1Fg+RPRImJhSVbLPndBK1XF6DKECxh1L 6s3l45hO/Gt1d3lPgHVkf4xtVc7hrNyeYpSvB5zaJvA12pm1+RCu3xXOc/5Y2Qdr6CJgk6 n756yVtD3txG08eQ2rXODQBWCSb7hl4= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-481-ihTE_LgnM6iA0rI0vI6q-g-1; Wed, 27 Jul 2022 08:07:39 -0400 X-MC-Unique: ihTE_LgnM6iA0rI0vI6q-g-1 Received: by mail-ot1-f69.google.com with SMTP id by5-20020a056830608500b00616c152aefbso8606943otb.6 for ; Wed, 27 Jul 2022 05:07:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EPqkkW3iptkB99T8sdQCA3opbpO1omuXsI7/ALoEDz8=; b=NZo78vNOan0lEVV92rdJGcdnb3v/sbFm3x/Nqw83ecZ997RgCz+AJNtGLfhzJx26E9 PVBQpRvJmgulhrE/E+hbeqdzmIKSquS65djMFSvGpnJlg0pfi+riti7SwBY0nw6fmMSH F0FdMC3XFZEzQLU9iL9ZskyTuzvVnHLKhCz3+dILCAzI9bozZsJ/uNLYXQVQLUb2Swxm uccUQ1W8b6Nef8mrL9mSjb43ovDSP1TXIE0AU759nt/Wo9PbmpesPhFPEqF4LxUkgEKF f7EJAqPQ1pi7zQG1IP/6mf3kJlGzHIbwdVv2oLaBfHMbLcyLXLtMgdM4WPAwu+BsARKv GxHA== X-Gm-Message-State: AJIora+F15lWQIdiwDxQNj5R1+RZam1Bcnpzkc87dnParMHtqqry3h5b L0GUoXsQWYR0ALkQSzUQyRtgVK3aZZsU2FgXEPYuUxOO+V6tVwQJYjUOhIh3lJkr20rEFt8l0Ta j1vcfWTChNf10fyIwXjOJ5w== X-Received: by 2002:a9d:162:0:b0:61c:af45:b49 with SMTP id 89-20020a9d0162000000b0061caf450b49mr7920761otu.34.1658923658686; Wed, 27 Jul 2022 05:07:38 -0700 (PDT) X-Received: by 2002:a9d:162:0:b0:61c:af45:b49 with SMTP id 89-20020a9d0162000000b0061caf450b49mr7920750otu.34.1658923658392; Wed, 27 Jul 2022 05:07:38 -0700 (PDT) Received: from zlang-mailbox ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id s6-20020a0568080b0600b0033a6939436bsm7089655oij.9.2022.07.27.05.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 05:07:37 -0700 (PDT) Date: Wed, 27 Jul 2022 20:07:32 +0800 From: Zorro Lang To: Sun Ke Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH v5] ext4: resize an ext4 which resize_inode feature is disabled but has reserved GDT blocks. Message-ID: <20220727120732.3645x57voyfozujz@zlang-mailbox> References: <20220727071140.3886185-1-sunke32@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220727071140.3886185-1-sunke32@huawei.com> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 On Wed, Jul 27, 2022 at 03:11:40PM +0800, Sun Ke wrote: > A regression test for b55c3cd102a6 ("ext4: add reserved GDT blocks > check"). Make sure there's not kernel crash, if resize an ext4 which > resize_inode feature is disabled but has reserved GDT blocks. > > Signed-off-by: Sun Ke > --- This version looks good to me, if no more review points from ext4 list, I'll merge it. Reviewed-by: Zorro Lang > 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..969da377 > --- /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 > +# > +# A regression test for b55c3cd102a6 ("ext4: add reserved GDT blocks check"). > +# Make sure there's not kernel crash, if resize an ext4 which resize_inode > +# feature is disabled but has reserved GDT blocks. > +# > +. ./common/preamble > +_begin_fstest auto resize quick > + > +# real QA test starts here > +_supported_fs ext4 > +_fixed_by_kernel_commit b55c3cd102a6 \ > + "ext4: add reserved GDT blocks check" > + > +_require_command "$RESIZE2FS_PROG" resize2fs > +_require_command "$DEBUGFS_PROG" debugfs > +_require_scratch_size_nocheck $((1024 * 1024)) > + > +# Initalize a 512M ext4 fs with resize_inode feature disabled > +dev_size=$((512 * 1024 * 1024)) > +MKFS_OPTIONS="-O ^resize_inode $MKFS_OPTIONS" _scratch_mkfs_sized $dev_size \ > + >>$seqres.full 2>&1 || _fail "mkfs failed" > + > +# Force some reserved GDT blocks to trigger the bug > +$DEBUGFS_PROG -w -R "set_super_value s_reserved_gdt_blocks 100" $SCRATCH_DEV \ > + >>$seqres.full 2>&1 > +$DEBUGFS_PROG -R "show_super_stats -h" $SCRATCH_DEV 2>/dev/null | \ > + grep "Reserved GDT blocks" > + > +_scratch_mount > + > +# Expect no crash from this resize operation > +$RESIZE2FS_PROG $SCRATCH_DEV 1G >> $seqres.full 2>&1 > + > +# success, all done > +status=0 > +exit > diff --git a/tests/ext4/057.out b/tests/ext4/057.out > new file mode 100644 > index 00000000..99423e16 > --- /dev/null > +++ b/tests/ext4/057.out > @@ -0,0 +1,2 @@ > +QA output created by 057 > +Reserved GDT blocks: 100 > -- > 2.13.6 >