Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp431259ybt; Wed, 17 Jun 2020 05:00:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpYLWYCKQo60OsHLt34ly+RxuxlCkWk7OjMZQ/FauVhIMRyRduiI+IJubrpyWgMVkJKLc3 X-Received: by 2002:a17:906:2a41:: with SMTP id k1mr7123806eje.502.1592395224646; Wed, 17 Jun 2020 05:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592395224; cv=none; d=google.com; s=arc-20160816; b=PgelhGyhpPhAd2OBIJ4uWKzLAuJMpy2Si85yjrYDMIVCUcbU6tiCQEO7/XxSCTdAoJ jX0dEKvNha1cuxHa5RqjE6yp4Pj1KYSX5iOeGqLmKmFf8VkkviD4BohRMQdrmUc00I13 GWIqaMJ2KxwYBi5cllZaayG6uqVNXhgrCgADaEqlU3BOqUDELCYjnHj1TEd5uPbYk3Au LAaJaH3RnZVRPwS8+KQ6Hy9Ca5wf8vDL+Mg39Aiqij7T/36NFCQ1qYPPxgF2T5ZmGQYt 2n3rLuzEUE6R4YGHoqfRerZiXgTk+FXGAKENgVtp2DasL2gu092l8UUzFpEeU4bTFQ5u D1mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9IdKWqvTZ+EnlWZ7okVzlelwOP7ufLEVBsM7gvfNxL8=; b=q//iRxumFpgBwPtntyJMrjcx9OVdrkYNkEddT9S2qas+pFkx+mbHqxAWq7j4Ulbork mwP075QFjiaz/oi56tRXlFZ+LGaZ1bp9Yq74VYl0uKCD9i+relGnuu8bKkmQqqprmLoc bQKT0x/M8RrFdhyEo7mdGOO5Xk2i/08FUNqn88Pcd/iKfP4ZlPpq0/if/+h5Jr23a4Dk HiO7vpXHe4CmiYmct+i183gU9ssayJvtWZ8PBEX0qpgIbarXOpIIjLtfmnQyM7IABG3f 9PMikRNEKdkpQTOjZ6lA+0WUXfFJfD8fm/+RrDG2yHzSB3Ekyu3reTTLK08dAaRilgDZ Cdvw== 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 y6si12137700edo.114.2020.06.17.05.00.01; Wed, 17 Jun 2020 05:00:24 -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 S1726838AbgFQL6t (ORCPT + 99 others); Wed, 17 Jun 2020 07:58:49 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35150 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726816AbgFQL6s (ORCPT ); Wed, 17 Jun 2020 07:58:48 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8E58374B058FB3BC4BEA; Wed, 17 Jun 2020 19:58:46 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 17 Jun 2020 19:58:35 +0800 From: "zhangyi (F)" To: , , CC: , , , Subject: [PATCH v2 5/5] ext4: remove write io error check before read inode block Date: Wed, 17 Jun 2020 19:59:47 +0800 Message-ID: <20200617115947.836221-6-yi.zhang@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200617115947.836221-1-yi.zhang@huawei.com> References: <20200617115947.836221-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org After we add ext4_end_buffer_async_write() callback into block layer to detect metadata buffer's async write error in the background, we can remove the partial fix for filesystem inconsistency problem caused by reading old data from disk in commit <9c83a923c67d> "ext4: don't read inode block if the buffer has a write error". Signed-off-by: zhangyi (F) --- fs/ext4/inode.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8ccb6996c384..b2fc1aef3886 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4281,15 +4281,6 @@ static int __ext4_get_inode_loc(struct inode *inode, if (!buffer_uptodate(bh)) { lock_buffer(bh); - /* - * If the buffer has the write error flag, we have failed - * to write out another inode in the same block. In this - * case, we don't have to read the block because we may - * read the old inode data successfully. - */ - if (buffer_write_io_error(bh) && !buffer_uptodate(bh)) - set_buffer_uptodate(bh); - if (buffer_uptodate(bh)) { /* someone brought it uptodate while we waited */ unlock_buffer(bh); -- 2.25.4