Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp257145pxt; Wed, 4 Aug 2021 22:01:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYtN4Yt7soexnyP4vCVS1lmZoZVRHIpnNq4yYQ7Xuwk69BEnA09nY985UrWlo/qTt25l+h X-Received: by 2002:a02:958e:: with SMTP id b14mr2804497jai.123.1628139662461; Wed, 04 Aug 2021 22:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628139662; cv=none; d=google.com; s=arc-20160816; b=RZFX+35YFHy634cv++j5Wi1hE2ica87duU7Hr9i43iOiHQtGITL+KUCtpXpunOvlK4 V6KKRqcvUXJmRPPjonxEc/7vi3eaQ+LgLx7QYdA3cwFGz/WBpiafuSpLL2mWJDLdSgDv d692e5mT/Md0SXPVGbqBX5ZKeBpDgW0J+QLWvpYois/zMiiwfA2lLDsnLs5ZqtTdIsJo RUYCpvSZzL28PsMZC+bKvubsiMQbsrE3UwNzm9qHtNhfHpad576mKFq/WKrMQMVGpIqc rEASpwxgem3kP5SAdIWzXOn43gR/XkHATi5MQS7Dhv06lemlN2fd4uski1J3I14GlsJk c/Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=CMK629/i8rlV/usgjzjv12E8h3L65L9c1FAVGf4uOxs=; b=ePuER6GhqbFz8mQ4XG+2tNe5MV0eRfBYcaFCYEqgbeV64w1+/Q0meN/QAV4ZY5rgiO LqkLHPl4Kx4rBZU0EiqXnwhT0ojNgas0UgkZfQcZfXsvchgMkd5NeEWl8of4ORT5dxDc TXLdLPsm2IX0cTQ0/ZCVt77iOMUr06YCmjhZbXjIDqF0ruemLa6XyQimGgZob3rF3bNV ClyLrn/jVV/xVQv9/OcmKHzXRSoLKgBk1n2WAIaUwB62ZoMPLnkugIwhTb3DqDkycJ50 vsAp61XngOznGSQt2TshmikHWWtL5ODvRefBmJfS9fjUvhizpsqalSsa4hIpmR5Bvv83 8RAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UgMNF7il; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si4799716iov.104.2021.08.04.22.00.45; Wed, 04 Aug 2021 22:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UgMNF7il; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 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 S231376AbhHECfr (ORCPT + 99 others); Wed, 4 Aug 2021 22:35:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50500 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbhHECfp (ORCPT ); Wed, 4 Aug 2021 22:35:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628130931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=CMK629/i8rlV/usgjzjv12E8h3L65L9c1FAVGf4uOxs=; b=UgMNF7ilIc0ValQixVBO6rfEsqD2+LeybNG+I9Rg4FgmzycGtzhD+SkWNOjnC0hQdrxJLk BrPbyn2URQXKmSN+BuwQVLQVvSeZBIAJZW/H5cUhwcHIlcirdYEYcGX424ezo3IVCBFfjG TkuYveHdZiWJb/SFXcmw7zfyGq8S9pg= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-1FPIUdMfNI6caA7_5CU_aQ-1; Wed, 04 Aug 2021 22:35:29 -0400 X-MC-Unique: 1FPIUdMfNI6caA7_5CU_aQ-1 Received: by mail-pj1-f71.google.com with SMTP id q6-20020a17090aa006b02901779796d79eso6135954pjp.1 for ; Wed, 04 Aug 2021 19:35:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CMK629/i8rlV/usgjzjv12E8h3L65L9c1FAVGf4uOxs=; b=MFJAxKNmeFdpkU2w7h1nhBqE8QCKBkD7aVNPPZLH3UhknSR52/9vyh4sKIH7KabzOI M+2SF1tUHyd4pPokG+mYpIjXxbOaMNfCJ6aTh7VtPLyN3roKLqRYn80nbbXRCkuHbx+Y WxcGSghKIxiA90rrcE5LJ+VJhWpgYXGyiR5X3/+xFNCZXSo2yJE1hbEgrLc3Sjtr2NmG cLnhKv+T+Vp5SGsLoZNttENGPJS2EuPxFNrLiz6CMxabWC2yN8xQI+s4XKWcX9QHnooA 0urHEBmrIQJeuMP8LtHZtllCrb4wlXcVWDFVINT2wxnjLxO52cFAmrTzXGGHoSnfDT91 EL0Q== X-Gm-Message-State: AOAM530YpHpiJrVsBzA7I672H13tcIg6o6JWNWQ05lg5e0TuF/6Sgknh QR8KvWG+VZ4/0IJv4qG4do2oqMrenugVXaFgMv64CJotSxPmY7zHPQZw0oL7mnpzJb4NrV83nY1 6QbHBxbINGteXcNRtqyozYTgP2brX+KEudu9y8A== X-Received: by 2002:a17:90b:4a06:: with SMTP id kk6mr12975653pjb.178.1628130928292; Wed, 04 Aug 2021 19:35:28 -0700 (PDT) X-Received: by 2002:a17:90b:4a06:: with SMTP id kk6mr12975632pjb.178.1628130927983; Wed, 04 Aug 2021 19:35:27 -0700 (PDT) MIME-Version: 1.0 From: Boyang Xue Date: Thu, 5 Aug 2021 10:35:16 +0800 Message-ID: Subject: [kernel-5.11 regression] tune2fs fails after shutdown To: linux-ext4@vger.kernel.org Content-Type: multipart/mixed; boundary="0000000000009c776a05c8c6c570" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org --0000000000009c776a05c8c6c570 Content-Type: text/plain; charset="UTF-8" Hi, kernel commit 4274f516d4bc ext4: recalucate superblock checksum after updating free blocks/inodes had been reverted by 81414b4dd48 ext4: remove redundant sb checksum recomputation since kernel-5.11-rc1. As a result, the original reproducer fails again. Reproducer: ``` mkdir mntpt fallocate -l 256M mntpt.img mkfs.ext4 -Fq -t ext4 mntpt.img 128M LPDEV=$(losetup -f --show mntpt.img) mount "$LPDEV" mntpt cp /proc/version mntpt/ ./godown mntpt # godown program attached. umount mntpt mount "$LPDEV" mntpt tune2fs -l "$LPDEV" ``` tune2fs fails with ``` tune2fs 1.46.2 (28-Feb-2021) tune2fs: Superblock checksum does not match superblock while trying to open /dev/loop0 Couldn't find valid filesystem superblock. ``` Tested on e2fsprogs-1.46.2 + kernel-5.14.0-0.rc3.29. I think it's a regression. If this is the case, can we fix it again please? Thanks, Boyang --0000000000009c776a05c8c6c570 Content-Type: application/octet-stream; name="godown.c" Content-Disposition: attachment; filename="godown.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kryazjid0 LyoKICogQ29weSB0aGlzIHByb2dyYW0gZnJvbSB4ZnN0ZXN0cy9zcmMvZ29kb3duLmMKICogY2hh bmdlIHNvbWUgY29kZSB0byBtYWtlIHN1cmUgdGhpcyBwcm9ncmFtIGNhbgogKiBiZSBjb21waWxl ZCBpbmRpdmlkdWFsbHksIGRvbid0IG5lZWQgdG8gY29tcGlsZQogKiB3aXRoIGFsbCB4ZnN0ZXN0 cyBwcm9ncmFtLiAKICog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