Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1444403pxf; Fri, 9 Apr 2021 08:33:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzZcVOsHEE39rZK2wrcXiadBP6Njhqbbh9rjn+/k5ovrwNHGYs2PyZwAbNqRHV/LRtgTUO X-Received: by 2002:a17:906:64f:: with SMTP id t15mr13549080ejb.411.1617982435138; Fri, 09 Apr 2021 08:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617982435; cv=none; d=google.com; s=arc-20160816; b=w1MHJ0yzrwIwustUSZkbMhH+tzDBJ8dK2aGXTSIGoQUSeuMG9V0uFBqajHx/ltUXwE KhcICC0n/0M0bheEtz6U3KaenLwCRceyooOop5RqdJRtNBQAK2boYbPgOVsaG/PGA6ys e/ArUvQCJv5e1snxC/aJAfc397vQk1mbTfjnM+2B90m+g6xojeuCBIQ3KBAdH0vzk+Fq pyKd3sLdkAxHp7hm7lc4VUkRFRtGZ2VDkQjyAr34io3KEEgi2d88+K8IGruGzvIo1P+u KQlweLCGVdM6hkOaSB4hlnHmThFIQ/0Nh7qj8Uy9qNl1hoLmzOJHstBDEFxu9oCKRyIn jKyg== 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; bh=EfWid8DBCiJyF/nZQ8tWECeN74xYTxMINfn+Y4duBgk=; b=qu6DzA0U+kmz1BVJwAQljZ4z26hxUEZbhJtZ3irnsUeql9jFRyxaOjYOvMqgpXweAp 88X1HTZowdfS+M3QjuhKFXdTXVmLWK57KeruqUOPWxMeTAnYgMbTkQNYCMgKVr2GzQoh frkRyyprA4qXnKtgSIG3HVj+F5pMVOhvDLrDGuQC0PQEFALORUjWF7uDRcNwvZ+S4aD5 uTSAxyiYfB6hmZnBeERWLmYhRNTa1kzLpya8b2y2NJy9Up23r0QUPRH8UFYtNMX+y1mq H5yKfSPyGosI/TFNlqjBU2jpOshbrRIcxt6KBr1JUPwkc1Swvu9LOQFDHe4rzAujK5Al 7gkA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si2368326edy.444.2021.04.09.08.33.28; Fri, 09 Apr 2021 08:33:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233775AbhDIPdQ (ORCPT + 99 others); Fri, 9 Apr 2021 11:33:16 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:39990 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232642AbhDIPdP (ORCPT ); Fri, 9 Apr 2021 11:33:15 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 139FWmbm015890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Apr 2021 11:32:48 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 4806715C3B12; Fri, 9 Apr 2021 11:32:48 -0400 (EDT) Date: Fri, 9 Apr 2021 11:32:48 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: Zhang Yi , linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca Subject: Re: [PATCH v2] ext4: fix check to prevent false positive report of incorrect used inodes Message-ID: References: <20210331121516.2243099-1-yi.zhang@huawei.com> <20210331122354.GH30749@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210331122354.GH30749@quack2.suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Mar 31, 2021 at 02:23:54PM +0200, Jan Kara wrote: > On Wed 31-03-21 20:15:16, Zhang Yi wrote: > > Commit <50122847007> ("ext4: fix check to prevent initializing reserved > > inodes") check the block group zero and prevent initializing reserved > > inodes. But in some special cases, the reserved inode may not all belong > > to the group zero, it may exist into the second group if we format > > filesystem below. > > > > mkfs.ext4 -b 4096 -g 8192 -N 1024 -I 4096 /dev/sda > > > > So, it will end up triggering a false positive report of a corrupted > > file system. This patch fix it by avoid check reserved inodes if no free > > inode blocks will be zeroed. > > > > Fixes: 50122847007 ("ext4: fix check to prevent initializing reserved inodes") > > Signed-off-by: Zhang Yi > > Suggested-by: Jan Kara > > Thanks! The patch looks good to me. Feel free to add: > > Reviewed-by: Jan Kara Thanks, applied. - Ted