Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1541645pxb; Thu, 7 Oct 2021 09:46:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD4p+Mt+BZK0RpXMCfBGsQlOHAvACsLP/DNfhG3aCufkOi4Gg4DKcU1v78Y+/sbqWjZs5Q X-Received: by 2002:a17:90a:d254:: with SMTP id o20mr6524305pjw.226.1633625198554; Thu, 07 Oct 2021 09:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633625198; cv=none; d=google.com; s=arc-20160816; b=cARUUZUspEX4U6fczpFtZXGwh/8ul4vaoa3QleJxOX0NIlY3z+Z584o2Us+6js+4Bu knsWPWHj23AR8FSWKwAd7NhmAii4RpQqgAa0N7ZqzsiC1UYiRnjiCPOc6Z5+M3PaDaE7 DjZg5IahzM1anjtDEoRjqecvz3JN4HLrfu+1VsFG06JGdyODy9f4bLI01ohOPOyfG0+a OMuzaZW4xK8faWIs1IzbNfV7w5ArnG2BirTnGjmdDr4JhSCJZkp04BUHEfOypmL6vNPW mO4RejkaRlf1daliS9XoU4jBoy8Z9tYoXH4l8mTcikiEaNxo24Za1cDkZC3doiJyhECP As6g== 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=4g9tB+S7h2gfJDCWMoenoK2txiHX5craMxCeBBH1hrA=; b=FsW/wVcHIRfSN1D/Eywv0W8KRTH0ut+ThtwWkX0ZxUEpznDXHNMWQtKC0dYtsv1F7T KdZ70io0QwWjbVX1oWEpFUVNGlQT5uWc5UzCbIeVoJrQ5jHwkla67dgnWieGP37l68k5 s/RfsFA/g6F4bL3OIPq3Mxfpjt5jtrKvDtFJnF+hZIoe001+rWtQKAroiVc6dEw5CVJG iz5Eesqp8SJSBnRbv4vEhyRQsXke8xHxCQowrDPkUBJF8RheolB7QRua8rh7ZHi1/pbX Nh19p1nwc+GA2UkStToHa7Le5ut/5Us9hIP9UP8PWS+2UfauS9SezrMBFHwp0UI0dugB cHsQ== 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 u189si74576pgd.384.2021.10.07.09.46.25; Thu, 07 Oct 2021 09:46:38 -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 S233631AbhJGQrO (ORCPT + 99 others); Thu, 7 Oct 2021 12:47:14 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:35543 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233522AbhJGQrN (ORCPT ); Thu, 7 Oct 2021 12:47:13 -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 197GjAO6024400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Oct 2021 12:45:10 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id E638915C3E70; Thu, 7 Oct 2021 12:45:09 -0400 (EDT) Date: Thu, 7 Oct 2021 12:45:09 -0400 From: "Theodore Ts'o" To: Zhang Yi Cc: linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, jack@suse.cz, yukuai3@huawei.com Subject: Re: [RFC PATCH 3/3] ext4: prevent partial update of the extent blocks Message-ID: References: <20210908120850.4012324-1-yi.zhang@huawei.com> <20210908120850.4012324-4-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210908120850.4012324-4-yi.zhang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Sep 08, 2021 at 08:08:50PM +0800, Zhang Yi wrote: > In the most error path of current extents updating operations are not > roll back partial updates properly when some bad things happens(.e.g in > ext4_ext_insert_extent()). So we may get an inconsistent extents tree > if journal has been aborted due to IO error, which may probability lead > to BUGON later when we accessing these extent entries in errors=continue > mode. This patch drop extent buffer's verify flag before updatng the > contents in ext4_ext_get_access(), and reset it after updating in > __ext4_ext_dirty(). After this patch we could force to check the extent > buffer if extents tree updating was break off, make sure the extents are > consistent. > > Signed-off-by: Zhang Yi Looks good, thanks Reviewed-by: Theodore Ts'o - Ted