Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3060863rwb; Thu, 29 Sep 2022 20:22:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DYuD7+gAewISwzOeshjNdqUC4EoVFRuWTT79uAgB/uTxETudpWQ4n79fDQXfDN/l0b0dJ X-Received: by 2002:a17:902:d3c6:b0:178:37e0:2e72 with SMTP id w6-20020a170902d3c600b0017837e02e72mr6768445plb.28.1664508171262; Thu, 29 Sep 2022 20:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664508171; cv=none; d=google.com; s=arc-20160816; b=tHbmnGoOy436ZwJQihm20aPVgIsIGXMoJMcvnpc9FHzvZYQqJ716zmpG2dLDL6psdM M9J1hw3FH9GdT3Vlru2nVIEVo64DbsgdpmA2Ra6MU3SjDUrF20HqlB0r1Fezzd94gJTu EIwBjjmj7vIfCBOXsRFTpSTwyNS2WxB4P/EXxc9jjoiaIp4nXIs7rzYOOWJLla3xdNXg ERXE4x4ZpywvWijKOHd5AjTHp+f0OJ+qCj5p9x0Ny248gGVpLoL5Jg68juCx2mD0FTDh zVsICdg0aDNM3FbshhxUPz9bPxb/CMXxz6Zk2nPO/GlEsqFIjUeH1uU3FCcoqlu5FbBm queQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XdarjUWVbKjgyXKB8T04eWwJ13J3nKwEei6rPN90rmM=; b=f5I+apZ5/IGE0FdrpVolasTF9WqEuSqQrOx8zcrNtOe1QNg2AhzmkFxcjKaBiKork/ eeXIVfuGka3IDfq2kJqS+bATlUfkp8WBLTKvYjIcAeQqnn4uckqia1mNZ5nrIbnWk41/ WlW0xN2pIezeTC81V5OtA9vnPuyhMSq2SR83NEh9q0rFdUDIISoW5N2WI/hvN0JuRpoO 2TZe4Ptxa8vPpKhUtVzOpSpOBgzigcCQFxkKPbHG8f0DXBlAHlkxHqn9f2NHTGsP3Oy9 Rz9Om5EQ++XczaRQ8b6pOANXlK3pFJ+4UQcSpdsbh4SVxm9EYA/L+EsoX7RMdX9iMwhw arGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=AIUHhkJ0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h38-20020a63f926000000b0042b1e17d98csi1541776pgi.438.2022.09.29.20.22.38; Thu, 29 Sep 2022 20:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=AIUHhkJ0; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230236AbiI3DVI (ORCPT + 99 others); Thu, 29 Sep 2022 23:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbiI3DUj (ORCPT ); Thu, 29 Sep 2022 23:20:39 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF33474C2 for ; Thu, 29 Sep 2022 20:20:11 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 28U3JpBO002543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Sep 2022 23:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1664507993; bh=XdarjUWVbKjgyXKB8T04eWwJ13J3nKwEei6rPN90rmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AIUHhkJ0EoCH2SuU2jchyhhyE7kxd7h+WwFXiR6xx9wqu4S6Lozb96vGCNkFWCJDk Ifmdrj4j4i9VLjPuhCNzTEQFJjXonIPWR3fwZMfoujgn9QznD2FoTqRjZlyZuhbE9R CjPF6OLQt1WGT60sYcXKBlL0c7kynp1BG4B9ZiXEUE5bPcXMlHjcHJA8+jG4evAUoA iG7jjvMfGsT9alOCJFqvFPC+SKb1mkADIqoPXOlU8v6JjX8V+CYOpGALKbtJMO/zZr 9fvvVhDc9G74F81hdq1OyT9X7hRBDeIdv6qXawPCVisqpix4Cu7yozePDLO/s/fwIc EqGeRQNy+dXCw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id A402915C3710; Thu, 29 Sep 2022 23:19:47 -0400 (EDT) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, Zhang Yi Cc: "Theodore Ts'o" , adilger.kernel@dilger.ca, openglfreak@googlemail.com, jack@suse.cz, yukuai3@huawei.com Subject: Re: [PATCH] ext4: ext4_read_bh_lock() should submit IO if the buffer isn't uptodate Date: Thu, 29 Sep 2022 23:19:46 -0400 Message-Id: <166450797715.256913.16436347919601739345.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20220831074629.3755110-1-yi.zhang@huawei.com> References: <20220831074629.3755110-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, 31 Aug 2022 15:46:29 +0800, Zhang Yi wrote: > Recently we notice that ext4 filesystem occasionally fail to read > metadata from disk and report error message, but the disk and block > layer looks fine. After analyse, we lockon commit 88dbcbb3a484 > ("blkdev: avoid migration stalls for blkdev pages"). It provide a > migration method for the bdev, we could move page that has buffers > without extra users now, but it lock the buffers on the page, which > breaks the fragile metadata read operation on ext4 filesystem, > ext4_read_bh_lock() was copied from ll_rw_block(), it depends on the > assumption of that locked buffer means it is under IO. So it just > trylock the buffer and skip submit IO if it lock failed, after > wait_on_buffer() we conclude IO error because the buffer is not > uptodate. > > [...] Applied, thanks! [1/1] ext4: ext4_read_bh_lock() should submit IO if the buffer isn't uptodate commit: 07e3f4273ff54a4c891f05e9f0f0c842b46578a7 Best regards, -- Theodore Ts'o