Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3611553pxt; Tue, 10 Aug 2021 07:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/qbxB1s6LNameKRJh0qg9TaKOzZNNgwmzuWnbCxRe9WZW2lBLZYsYMjRmhemgYtxaUiJR X-Received: by 2002:a17:906:2547:: with SMTP id j7mr27149144ejb.491.1628605695490; Tue, 10 Aug 2021 07:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628605695; cv=none; d=google.com; s=arc-20160816; b=QGrKiippmigKvl0YRKKLXm3PXk4zbXliFBmb2oNQ8ys7I6msXAhDYE+biTCCbcaVSi 706yz3iyOC8YbOHvJri086yXSBu6tdQCoynYvbcLQrFsworHQm1dErrjNIDJqLMBrWTW hrNRjGlH41mTZxNEKOhzRY1Qn3v07FDdhz6IRSiI1U0RzbkQD1gg8vQJaIMzBJgD//SU Z2Tjua8puUzd07A8MZaAoeLGd4QPl+GQlKXKxmoUnzqmAgK01xRb0/j1o/U7KR63Jb4r QvPPt4xnJ7LyD0ift67SH0ogI5biMwdVliORLnjaWESioFsOu7yYk/h7QTaY6tMaNkVX KnUQ== 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 :message-id:date:subject:cc:to:from; bh=ilKegvQ7VjauA8ZuNig9vqlSyVoGcBkwagk7sjE+ELA=; b=XX3nK33G0s9rGerfwwrteemg+PoV64XnB3mfhjG0GSOVZs49LebVwtdiogKxiIFGgx 9iTTcddUaxXhPgawvZPoPcs3/ugCffTnU3YtEwPG2UnxoEDaQDwBcco3bexNyj0BiFYg XJPNotYJ4Q0yw//Vlx2tgvxj1f/LcT9iFyK35QimUB4y/Jk8jfU7JITpGG/VvkVTCq6M NSfLsGiwHm6f/E8exZ1uWmVuhBMlDZqS49gVlrqgKsY7R+8ojio3mufosXJD6Y1eQXZO Bo7KkdKFRzAoqo0lZCgayypd0rpTe8+iOXMl0rseW/15d6ud+xcUOdl4+yU7bEnuADgd ROWQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si17815281edr.38.2021.08.10.07.27.50; Tue, 10 Aug 2021 07:28:15 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242357AbhHJOS5 (ORCPT + 99 others); Tue, 10 Aug 2021 10:18:57 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:8394 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242832AbhHJORG (ORCPT ); Tue, 10 Aug 2021 10:17:06 -0400 Received: from dggeme752-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GkZfP64gpz85xS; Tue, 10 Aug 2021 22:12:45 +0800 (CST) Received: from huawei.com (10.175.127.227) by dggeme752-chm.china.huawei.com (10.3.19.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 10 Aug 2021 22:16:41 +0800 From: Zhang Yi To: CC: , , , , Subject: [PATCH 0/3] ext4: fix a inode checksum error Date: Tue, 10 Aug 2021 22:27:19 +0800 Message-ID: <20210810142722.923175-1-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme752-chm.china.huawei.com (10.3.19.98) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org We find a checksum error and a inode corruption problem while doing stress test, this 3 patches address to fix them. - Checksum error EXT4-fs error (device sda): ext4_lookup:1784: inode #131074: comm cat: iget: checksum invalid - Inode corruption e2fsck 1.46.0 (29-Jan-2020) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Entry 'foo' in / (2) has deleted/unused inode 17. Clear? yes Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Inode bitmap differences: -17 Fix? yes Free inodes count wrong for group #0 (32750, counted=32751). Fix? yes Free inodes count wrong (32750, counted=32751). Fix? yes The first patch is relate to the error simulation, and the second patch is just a cleanup patch, which are prepare to do the fix. The last patch fix these two issue. Thanks, Yi. Zhang Yi (3): ext4: move inode eio simulation behind io completeion ext4: remove an unnecessary if statement in __ext4_get_inode_loc() ext4: prevent getting empty inode buffer fs/ext4/inode.c | 177 +++++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 83 deletions(-) -- 2.31.1