Message ID | 20230221115919.1918161-5-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1659468wrn; Mon, 20 Feb 2023 20:02:39 -0800 (PST) X-Google-Smtp-Source: AK7set/Nm44NyjqJW8zD424qTpYJQmpT4DZjDWkkWURBvP8qM+/vv6hCdwK0wdnaW8k85bVrEAnO X-Received: by 2002:a17:902:ce8e:b0:196:59a0:bffe with SMTP id f14-20020a170902ce8e00b0019659a0bffemr5128292plg.17.1676952159573; Mon, 20 Feb 2023 20:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676952159; cv=none; d=google.com; s=arc-20160816; b=PydZORH4wKZf8tszx82YczOLKO9KdlfcXgdgXpGDAof6u3R2cm1XIezLxsvW775h5n pqG8EX3YTNgcQxe0Uc/IeJoWAPSM6uLlpczxgOtnhUmFeWcZLQBR0H2me7bQlG71fb0g XEYuFq0W0Vdevzdpt3Mpz6elHFW2F3vU9IpG1E0WGxzFfmoAxQTnJDeO+twdst7foinr leczj27nuSGbvuUoQnCDQWjh91mSwH5w/+QszJw+tI2sbpcY/oGtkUDo3DhfomPodUUB fnMspriy0b/B4CagPr8Omy5XhncXyQpfS0PvwOUYwqgHYz0c7KowQ0h2HO+cTXeAMVI4 BbgA== 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=s9R8tXPKwGkUzVPwRPCi4BXtChMEEdnZeGDnGoOcDLg=; b=aXzgzvYp86alJjko3DiN8NxjmjSQBfGmH5FeraAKn/oQlwOJ7cZss36DsMaVnTjLYG 8GBA4qt5J1PkTirFbAiTtygHFFGK8dW2mO4WSYQumfX4s42hWWIHHLnRezXYSaBojVgQ nTwV/iFIps0VuytkN3R1BSP/+ZMKEHZsEN4n/T9G0SSWD8w7Y4crOauMJOygdjcK7+Id 8PinieTsWk1TtiAbw3ftYa2ucCYSYZZWSnJcojciyoIjAIyfG9nI6VAghRcVkwxo2/Wr 3TAVSKEInYMSm5IcDxAKoufb7LwCbZN8gDX1eagCZca/96m70TZf+apGo1zCaahtUT9N 6exA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a170902684d00b0019a9d960a57si2467970pln.293.2023.02.20.20.02.25; Mon, 20 Feb 2023 20:02:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233571AbjBUD6B (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Mon, 20 Feb 2023 22:58:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233147AbjBUD5n (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Feb 2023 22:57:43 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0491C24CAC; Mon, 20 Feb 2023 19:57:39 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PLQV56rBbz4f3tDj; Tue, 21 Feb 2023 11:57:33 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgC3q+ktQfRj8VfgDw--.30652S6; Tue, 21 Feb 2023 11:57:36 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH 4/7] ext4: remove unnecessary check in ext4_bg_num_gdb_nometa Date: Tue, 21 Feb 2023 19:59:16 +0800 Message-Id: <20230221115919.1918161-5-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230221115919.1918161-1-shikemeng@huaweicloud.com> References: <20230221115919.1918161-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgC3q+ktQfRj8VfgDw--.30652S6 X-Coremail-Antispam: 1UD129KBjvdXoWrZrWUWr4xJF18KrykJFW5ZFb_yoWfArc_Ka y7XF1xua43Xw1fKa4xKws5K347Kr4vyr45XFn3try3ua48tayxA34DArs3ZayDuF47ArZ5 Za4xu347tw4IqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbgkYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_JFv_Gryl82 xGYIkIc2x26280x7IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVW8JVW5JwA2ocxC 64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM2 8EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq 3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II 8E6IAqYI8I648v4I1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2Iq xVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r 126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY 6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67 AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuY vjTRQIDrUUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758411787549634524?= X-GMAIL-MSGID: =?utf-8?q?1758411787549634524?= |
Series |
A few patches to improve ext4 balloc
|
|
Commit Message
Kemeng Shi
Feb. 21, 2023, 11:59 a.m. UTC
We only call ext4_bg_num_gdb_nometa if there is no meta_bg feature or group
does not reach first_meta_bg, so group must not reside in meta group. Then
group has a global gdt if superblock exists. Just remove confusing branch
that meta_bg feature exists.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
fs/ext4/balloc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
Linux regression tracking (Thorsten Leemhuis)
June 13, 2023, 12:04 p.m. UTC |
#1
Addressed
Unaddressed
[just resend while CCing the regression list, as the report apparently didn't make it to the lists] On 13.06.23 13:15, Stefan Lippers-Hollmann wrote: > On 2023-02-21, Kemeng Shi wrote: >> We only call ext4_bg_num_gdb_nometa if there is no meta_bg feature or group >> does not reach first_meta_bg, so group must not reside in meta group. Then >> group has a global gdt if superblock exists. Just remove confusing branch >> that meta_bg feature exists. >> >> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> >> --- >> fs/ext4/balloc.c | 5 +---- >> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c >> index 9b8a32b90ddc..08f1692f7d2f 100644 >> --- a/fs/ext4/balloc.c >> +++ b/fs/ext4/balloc.c >> @@ -844,10 +844,7 @@ static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, >> if (!ext4_bg_has_super(sb, group)) >> return 0; >> >> - if (ext4_has_feature_meta_bg(sb)) >> - return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); >> - else >> - return EXT4_SB(sb)->s_gdb_count; >> + return EXT4_SB(sb)->s_gdb_count; >> } >> >> /** > > This change as part of v6.4-rc6-26-gfb054096aea0 seems to cause a > regression for mounting a (large, lvm2 backed, grown several times, > probably also shrunk at least once) ext4 filesystem for me (other, > smaller/ simpler ext4 filesystems mount fine). > > # LANG= mount /dev/vg-trident/storage /mnt/ > mount: /mnt: mount(2) system call failed: Structure needs cleaning. > dmesg(1) may have more information after failed mount system call. > > [ 569.576241] EXT4-fs (dm-6): ext4_check_descriptors: Inode table for group 2 overlaps block group descriptors > [ 569.576251] EXT4-fs (dm-6): group descriptors corrupted! > > e2fsck (1.47.0-2, Debian/unstable, amd64) does not find any problems > about this fs. > > # fsck -f /dev/vg-trident/storage > fsck from util-linux 2.38.1 > e2fsck 1.47.0 (5-Feb-2023) > Pass 1: Checking inodes, blocks, and sizes > Pass 2: Checking directory structure > Pass 3: Checking directory connectivity > Pass 4: Checking reference counts > Pass 5: Checking group summary information > storage: 1274324/595369984 files (0.4% non-contiguous), 4194120223/4762936320 blocks > > Bisecting leads me to this patch: > > $ git bisect log > git bisect start > # Status: warte auf guten und schlechten Commit > # good: [457391b0380335d5e9a5babdec90ac53928b23b4] Linux 6.3 > git bisect good 457391b0380335d5e9a5babdec90ac53928b23b4 > # Status: warte auf schlechten Commit, 1 guter Commit bekannt > # bad: [fb054096aea0576f0c0a61c598e5e9676443ee86] Merge tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > git bisect bad fb054096aea0576f0c0a61c598e5e9676443ee86 > # bad: [6e98b09da931a00bf4e0477d0fa52748bf28fcce] Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next > git bisect bad 6e98b09da931a00bf4e0477d0fa52748bf28fcce > # good: [088e0c188513b58a0056a488cf5b7df094a8a48a] Merge tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 > git bisect good 088e0c188513b58a0056a488cf5b7df094a8a48a > # good: [ca288965801572fe41386560d4e6c5cc0e5cc56d] Merge tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next > git bisect good ca288965801572fe41386560d4e6c5cc0e5cc56d > # bad: [94fc0792661a96d64a4bb79cf10d0793ecadf76e] Merge tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs > git bisect bad 94fc0792661a96d64a4bb79cf10d0793ecadf76e > # good: [4173cf6fb6b7d1b4569cca08af318c4561356fb5] Merge tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging > git bisect good 4173cf6fb6b7d1b4569cca08af318c4561356fb5 > # good: [98f99e67a1dc456e9a542584819b2aa265ffc737] Merge tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux > git bisect good 98f99e67a1dc456e9a542584819b2aa265ffc737 > # good: [ba24b8eb3ef676cb7d6cef4a2a53f3624f880d42] crypto: testmgr - Add some test vectors for cmac(camellia) > git bisect good ba24b8eb3ef676cb7d6cef4a2a53f3624f880d42 > # bad: [4d934a5e6caa6dcdd3fbee7b96fe512a455863b6] ext4: Convert ext4_write_begin() to use a folio > git bisect bad 4d934a5e6caa6dcdd3fbee7b96fe512a455863b6 > # bad: [78dc9f844f4ec999a30517313040948a4c4bbc00] ext4: use best found when complex scan of group finishs > git bisect bad 78dc9f844f4ec999a30517313040948a4c4bbc00 > # bad: [b83acc77718644b2c19832226ca284ce01efc550] ext4: remove unused group parameter in ext4_inode_bitmap_csum_verify > git bisect bad b83acc77718644b2c19832226ca284ce01efc550 > # good: [e6c28a26b799c7640b77daff3e4a67808c74381c] ext4: Fix warnings when freezing filesystem with journaled data > git bisect good e6c28a26b799c7640b77daff3e4a67808c74381c > # good: [a38627f14356f505f621b31197fd872b99a10563] ext4: call ext4_bg_num_gdb_[no]meta directly in ext4_num_base_meta_clusters > git bisect good a38627f14356f505f621b31197fd872b99a10563 > # bad: [f567ea7843562b7d7dfe1e6cfea455a1e9623208] ext4: remove stale comment in ext4_init_block_bitmap > git bisect bad f567ea7843562b7d7dfe1e6cfea455a1e9623208 > > # tune2fs -l /dev/vg-trident/storage > tune2fs 1.47.0 (5-Feb-2023) > Filesystem volume name: storage > Last mounted on: /srv/storage > Filesystem UUID: ad4e7e8d-f375-491f-a5dd-6251d32229e6 > Filesystem magic number: 0xEF53 > Filesystem revision #: 1 (dynamic) > Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum > Filesystem flags: signed_directory_hash > Default mount options: user_xattr acl > Filesystem state: clean > Errors behavior: Continue > Filesystem OS type: Linux > Inode count: 595369984 > Block count: 4762936320 > Reserved block count: 0 > Overhead clusters: 37571453 > Free blocks: 568816097 > Free inodes: 594095660 > First block: 0 > Block size: 4096 > Fragment size: 4096 > Group descriptor size: 64 > Blocks per group: 32768 > Fragments per group: 32768 > Inodes per group: 4096 > Inode blocks per group: 256 > First meta block group: 1453 > Flex block group size: 16 > Filesystem created: Tue Dec 16 03:26:32 2014 > Last mount time: Tue Jun 13 08:54:33 2023 > Last write time: Tue Jun 13 08:55:57 2023 > Mount count: 0 > Maximum mount count: -1 > Last checked: Tue Jun 13 08:55:57 2023 > Check interval: 0 (<none>) > Lifetime writes: 145 TB > Reserved blocks uid: 0 (user root) > Reserved blocks gid: 0 (group root) > First inode: 11 > Inode size: 256 > Required extra isize: 28 > Desired extra isize: 28 > Journal inode: 8 > Default directory hash: half_md4 > Directory Hash Seed: 3e89594a-1c09-4c46-bb6e-402ad3d697b8 > Journal backup: inode blocks > Checksum type: crc32c > Checksum: 0xa57a2ce7 > > -- dumpe2fs -- > > dumpe2fs 1.47.0 (5-Feb-2023) > Filesystem volume name: storage > Last mounted on: /srv/storage > Filesystem UUID: ad4e7e8d-f375-491f-a5dd-6251d32229e6 > Filesystem magic number: 0xEF53 > Filesystem revision #: 1 (dynamic) > Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum > Filesystem flags: signed_directory_hash > Default mount options: user_xattr acl > Filesystem state: clean > Errors behavior: Continue > Filesystem OS type: Linux > Inode count: 595369984 > Block count: 4762936320 > Reserved block count: 0 > Overhead clusters: 37571453 > Free blocks: 568816097 > Free inodes: 594095660 > First block: 0 > Block size: 4096 > Fragment size: 4096 > Group descriptor size: 64 > Blocks per group: 32768 > Fragments per group: 32768 > Inodes per group: 4096 > Inode blocks per group: 256 > First meta block group: 1453 > Flex block group size: 16 > Filesystem created: Tue Dec 16 03:26:32 2014 > Last mount time: Tue Jun 13 08:54:33 2023 > Last write time: Tue Jun 13 09:07:45 2023 > Mount count: 0 > Maximum mount count: -1 > Last checked: Tue Jun 13 09:07:45 2023 > Check interval: 0 (<none>) > Lifetime writes: 145 TB > Reserved blocks uid: 0 (user root) > Reserved blocks gid: 0 (group root) > First inode: 11 > Inode size: 256 > Required extra isize: 28 > Desired extra isize: 28 > Journal inode: 8 > Default directory hash: half_md4 > Directory Hash Seed: 3e89594a-1c09-4c46-bb6e-402ad3d697b8 > Journal backup: inode blocks > Checksum type: crc32c > Checksum: 0xf32a54d5 > Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3 > Total journal size: 128M > Total journal blocks: 32768 > Max transaction length: 32768 > Fast commit length: 0 > Journal sequence: 0x0074096a > Journal start: 0 > Journal checksum type: crc32c > Journal checksum: 0x478ec5ac > > [... cut, the full dumpe2fs is ~60 MB, and even xz -9 compressed > still ~6 MB large ...] > > Reverting (just) ad3f09be6cfe332be8ff46c78e6ec0f8839107aa from > v6.4-rc6-27-ge328c473340c allows me to mount this filesystem again. > > This seems to be the same issue as: > https://bugzilla.kernel.org/show_bug.cgi?id=217534 > https://lkml.kernel.org/r/<17d7e7f8-ad8d-1696-32b7-3ff9fd4548c1@gmail.com> > > Regards > Stefan Lippers-Hollmann >
on 6/13/2023 7:15 PM, Stefan Lippers-Hollmann wrote: > Hi > > On 2023-02-21, Kemeng Shi wrote: >> We only call ext4_bg_num_gdb_nometa if there is no meta_bg feature or group >> does not reach first_meta_bg, so group must not reside in meta group. Then >> group has a global gdt if superblock exists. Just remove confusing branch >> that meta_bg feature exists. >> >> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> >> --- >> fs/ext4/balloc.c | 5 +---- >> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c >> index 9b8a32b90ddc..08f1692f7d2f 100644 >> --- a/fs/ext4/balloc.c >> +++ b/fs/ext4/balloc.c >> @@ -844,10 +844,7 @@ static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, >> if (!ext4_bg_has_super(sb, group)) >> return 0; >> >> - if (ext4_has_feature_meta_bg(sb)) >> - return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); >> - else >> - return EXT4_SB(sb)->s_gdb_count; >> + return EXT4_SB(sb)->s_gdb_count; >> } >> >> /** > > This change as part of v6.4-rc6-26-gfb054096aea0 seems to cause a > regression for mounting a (large, lvm2 backed, grown several times, > probably also shrunk at least once) ext4 filesystem for me (other, > smaller/ simpler ext4 filesystems mount fine). > Hi Stefan, thank you for let me know the issue. It seems that s_gdb_count is block number used for both non-meta and meta block group descriptors. However we should return block number used for non-meta block group in ext4_bg_num_gdb_nometa. Sorry for this problem, I will send a revert patch to fix this. > # LANG= mount /dev/vg-trident/storage /mnt/ > mount: /mnt: mount(2) system call failed: Structure needs cleaning. > dmesg(1) may have more information after failed mount system call. > > [ 569.576241] EXT4-fs (dm-6): ext4_check_descriptors: Inode table for group 2 overlaps block group descriptors > [ 569.576251] EXT4-fs (dm-6): group descriptors corrupted! > > e2fsck (1.47.0-2, Debian/unstable, amd64) does not find any problems > about this fs. > > # fsck -f /dev/vg-trident/storage > fsck from util-linux 2.38.1 > e2fsck 1.47.0 (5-Feb-2023) > Pass 1: Checking inodes, blocks, and sizes > Pass 2: Checking directory structure > Pass 3: Checking directory connectivity > Pass 4: Checking reference counts > Pass 5: Checking group summary information > storage: 1274324/595369984 files (0.4% non-contiguous), 4194120223/4762936320 blocks > > Bisecting leads me to this patch: > > $ git bisect log > git bisect start > # Status: warte auf guten und schlechten Commit > # good: [457391b0380335d5e9a5babdec90ac53928b23b4] Linux 6.3 > git bisect good 457391b0380335d5e9a5babdec90ac53928b23b4 > # Status: warte auf schlechten Commit, 1 guter Commit bekannt > # bad: [fb054096aea0576f0c0a61c598e5e9676443ee86] Merge tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > git bisect bad fb054096aea0576f0c0a61c598e5e9676443ee86 > # bad: [6e98b09da931a00bf4e0477d0fa52748bf28fcce] Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next > git bisect bad 6e98b09da931a00bf4e0477d0fa52748bf28fcce > # good: [088e0c188513b58a0056a488cf5b7df094a8a48a] Merge tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 > git bisect good 088e0c188513b58a0056a488cf5b7df094a8a48a > # good: [ca288965801572fe41386560d4e6c5cc0e5cc56d] Merge tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next > git bisect good ca288965801572fe41386560d4e6c5cc0e5cc56d > # bad: [94fc0792661a96d64a4bb79cf10d0793ecadf76e] Merge tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs > git bisect bad 94fc0792661a96d64a4bb79cf10d0793ecadf76e > # good: [4173cf6fb6b7d1b4569cca08af318c4561356fb5] Merge tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging > git bisect good 4173cf6fb6b7d1b4569cca08af318c4561356fb5 > # good: [98f99e67a1dc456e9a542584819b2aa265ffc737] Merge tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux > git bisect good 98f99e67a1dc456e9a542584819b2aa265ffc737 > # good: [ba24b8eb3ef676cb7d6cef4a2a53f3624f880d42] crypto: testmgr - Add some test vectors for cmac(camellia) > git bisect good ba24b8eb3ef676cb7d6cef4a2a53f3624f880d42 > # bad: [4d934a5e6caa6dcdd3fbee7b96fe512a455863b6] ext4: Convert ext4_write_begin() to use a folio > git bisect bad 4d934a5e6caa6dcdd3fbee7b96fe512a455863b6 > # bad: [78dc9f844f4ec999a30517313040948a4c4bbc00] ext4: use best found when complex scan of group finishs > git bisect bad 78dc9f844f4ec999a30517313040948a4c4bbc00 > # bad: [b83acc77718644b2c19832226ca284ce01efc550] ext4: remove unused group parameter in ext4_inode_bitmap_csum_verify > git bisect bad b83acc77718644b2c19832226ca284ce01efc550 > # good: [e6c28a26b799c7640b77daff3e4a67808c74381c] ext4: Fix warnings when freezing filesystem with journaled data > git bisect good e6c28a26b799c7640b77daff3e4a67808c74381c > # good: [a38627f14356f505f621b31197fd872b99a10563] ext4: call ext4_bg_num_gdb_[no]meta directly in ext4_num_base_meta_clusters > git bisect good a38627f14356f505f621b31197fd872b99a10563 > # bad: [f567ea7843562b7d7dfe1e6cfea455a1e9623208] ext4: remove stale comment in ext4_init_block_bitmap > git bisect bad f567ea7843562b7d7dfe1e6cfea455a1e9623208 > > # tune2fs -l /dev/vg-trident/storage > tune2fs 1.47.0 (5-Feb-2023) > Filesystem volume name: storage > Last mounted on: /srv/storage > Filesystem UUID: ad4e7e8d-f375-491f-a5dd-6251d32229e6 > Filesystem magic number: 0xEF53 > Filesystem revision #: 1 (dynamic) > Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum > Filesystem flags: signed_directory_hash > Default mount options: user_xattr acl > Filesystem state: clean > Errors behavior: Continue > Filesystem OS type: Linux > Inode count: 595369984 > Block count: 4762936320 > Reserved block count: 0 > Overhead clusters: 37571453 > Free blocks: 568816097 > Free inodes: 594095660 > First block: 0 > Block size: 4096 > Fragment size: 4096 > Group descriptor size: 64 > Blocks per group: 32768 > Fragments per group: 32768 > Inodes per group: 4096 > Inode blocks per group: 256 > First meta block group: 1453 > Flex block group size: 16 > Filesystem created: Tue Dec 16 03:26:32 2014 > Last mount time: Tue Jun 13 08:54:33 2023 > Last write time: Tue Jun 13 08:55:57 2023 > Mount count: 0 > Maximum mount count: -1 > Last checked: Tue Jun 13 08:55:57 2023 > Check interval: 0 (<none>) > Lifetime writes: 145 TB > Reserved blocks uid: 0 (user root) > Reserved blocks gid: 0 (group root) > First inode: 11 > Inode size: 256 > Required extra isize: 28 > Desired extra isize: 28 > Journal inode: 8 > Default directory hash: half_md4 > Directory Hash Seed: 3e89594a-1c09-4c46-bb6e-402ad3d697b8 > Journal backup: inode blocks > Checksum type: crc32c > Checksum: 0xa57a2ce7 > > -- dumpe2fs -- > > dumpe2fs 1.47.0 (5-Feb-2023) > Filesystem volume name: storage > Last mounted on: /srv/storage > Filesystem UUID: ad4e7e8d-f375-491f-a5dd-6251d32229e6 > Filesystem magic number: 0xEF53 > Filesystem revision #: 1 (dynamic) > Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum > Filesystem flags: signed_directory_hash > Default mount options: user_xattr acl > Filesystem state: clean > Errors behavior: Continue > Filesystem OS type: Linux > Inode count: 595369984 > Block count: 4762936320 > Reserved block count: 0 > Overhead clusters: 37571453 > Free blocks: 568816097 > Free inodes: 594095660 > First block: 0 > Block size: 4096 > Fragment size: 4096 > Group descriptor size: 64 > Blocks per group: 32768 > Fragments per group: 32768 > Inodes per group: 4096 > Inode blocks per group: 256 > First meta block group: 1453 > Flex block group size: 16 > Filesystem created: Tue Dec 16 03:26:32 2014 > Last mount time: Tue Jun 13 08:54:33 2023 > Last write time: Tue Jun 13 09:07:45 2023 > Mount count: 0 > Maximum mount count: -1 > Last checked: Tue Jun 13 09:07:45 2023 > Check interval: 0 (<none>) > Lifetime writes: 145 TB > Reserved blocks uid: 0 (user root) > Reserved blocks gid: 0 (group root) > First inode: 11 > Inode size: 256 > Required extra isize: 28 > Desired extra isize: 28 > Journal inode: 8 > Default directory hash: half_md4 > Directory Hash Seed: 3e89594a-1c09-4c46-bb6e-402ad3d697b8 > Journal backup: inode blocks > Checksum type: crc32c > Checksum: 0xf32a54d5 > Journal features: journal_incompat_revoke journal_64bit journal_checksum_v3 > Total journal size: 128M > Total journal blocks: 32768 > Max transaction length: 32768 > Fast commit length: 0 > Journal sequence: 0x0074096a > Journal start: 0 > Journal checksum type: crc32c > Journal checksum: 0x478ec5ac > > [... cut, the full dumpe2fs is ~60 MB, and even xz -9 compressed > still ~6 MB large ...] > > Reverting (just) ad3f09be6cfe332be8ff46c78e6ec0f8839107aa from > v6.4-rc6-27-ge328c473340c allows me to mount this filesystem again. > > This seems to be the same issue as: > https://bugzilla.kernel.org/show_bug.cgi?id=217534 > https://lkml.kernel.org/r/<17d7e7f8-ad8d-1696-32b7-3ff9fd4548c1@gmail.com> > > Regards > Stefan Lippers-Hollmann >
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 9b8a32b90ddc..08f1692f7d2f 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -844,10 +844,7 @@ static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, if (!ext4_bg_has_super(sb, group)) return 0; - if (ext4_has_feature_meta_bg(sb)) - return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); - else - return EXT4_SB(sb)->s_gdb_count; + return EXT4_SB(sb)->s_gdb_count; } /**