Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1411111rwb; Tue, 29 Nov 2022 13:13:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf5eb69fMNnL+abvyM+SFKdNorIj6ry1EK20QNNfgmtTVdTJ6GD0L9rUVLC+GBKIndRy5KBj X-Received: by 2002:a17:902:d58d:b0:187:2502:888f with SMTP id k13-20020a170902d58d00b001872502888fmr43798469plh.136.1669756439376; Tue, 29 Nov 2022 13:13:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669756439; cv=none; d=google.com; s=arc-20160816; b=YCnVFnDw6XlkuViWV5ll67bJMhC7AywCg7Xt55QQxjj3HWTASMCycgymBxg/D+WgJ9 8zdqgzswSKV6/Qe38fZbLPu5NkHDTvCX9P+3hLP0YCDJdEwACx/CCybKvylx9tgq9YVv fVBKcsqiloQbHtfeqpf4BnnUv4FVywTTqs64nHXi2gSHc2URH9FLhR3/fpJZB1Xz5/Ib KZvHRL656Wunt85IfSywlvN5v+wiJpK1aXP31tQcdFVMzVhavwc1c+4gGV2eQQcVF7xy Zd7e+FLRSpACtax0Wtzf1Dcd4p8yi0VWuM95AOycGw4xwU+oAfSb4wJe7l03Ax+vytqE QOoA== 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=S7Jnx1qYVJ2q71fG9wc61THNDckCab0vrYwdOiW5SP0=; b=Dj2qSYC8rPVGJTLTH/nnetdI7wd6qDb+v3HmHkczUYA8uOagwuGiAazdDOftKFVSZf LEyhGGw3IjmtGBBm5Ld83W0Cj2NVYyGyfLmnLgbzMqcMIbVglPk/Cg8npBIGo7GoryKK AzE2EkezLiNJq38GUwKN5FOb7Ed1HkYEsURjJoyNHJmhc9ZazjI6x23QBxZdnHsJD7iY 158oTzriXBZR/zGkNc8SDt6xpZtoI5b4jKI4EftsMVpDOxg9MViJkHFZOEpEwvJ3gZUj lYqcZrYsJ2+nFt+km6fJS1virtvhs92iv9o9uENdaknXmbIbIm+OKIWG2LGEyRuUIA5J NeFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=Algx5Vgo; 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 g10-20020a056a0023ca00b00554e240fa1bsi17513532pfc.95.2022.11.29.13.13.46; Tue, 29 Nov 2022 13:13:59 -0800 (PST) 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=Algx5Vgo; 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 S237122AbiK2VNV (ORCPT + 99 others); Tue, 29 Nov 2022 16:13:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236889AbiK2VMl (ORCPT ); Tue, 29 Nov 2022 16:12:41 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D6FD13DDF for ; Tue, 29 Nov 2022 13:12:40 -0800 (PST) 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 2ATLCLJ9029771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 16:12:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1669756342; bh=S7Jnx1qYVJ2q71fG9wc61THNDckCab0vrYwdOiW5SP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Algx5VgoSbxV5UHZf9WEpV8cEt1Bhb3UdGd3OHb5YtknKjUBQ8xsD81wtrqul4522 LHtgrGSOvaQxS2mYUd/EzseKt98C+/uII2BgamWRTFphdrZF3IE23uBU4WB+ebzMLK hz5dL0TjYOcBMau9TWm8MDKkZ1IgsYirXanplKQ/MQSpyTLOYv3l3MXbCO1L/Pekf6 tYL/FZFZRk09QXLLc7PiSwZACeQ4eMjMct0nCl1RJiKBYfWodKF4W3KlygAjEHCzMA R+bwe1RbUeQA5ExoyqSmwQ8MXSunQ7Ww/2phfJqxhYPiiz5QmAzCawgjxZz4H0sRku C8rJm5yAqtmzA== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 6D96E15C3AD1; Tue, 29 Nov 2022 16:12:19 -0500 (EST) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, Zhang Yi Cc: "Theodore Ts'o" , jack@suse.cz, yukuai3@huawei.com, adilger.kernel@dilger.ca Subject: Re: [PATCH v3 1/2] ext4: silence the warning when evicting inode with dioread_nolock Date: Tue, 29 Nov 2022 16:12:15 -0500 Message-Id: <166975630697.2135297.10209303433796955869.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20220629112647.4141034-1-yi.zhang@huawei.com> References: <20220629112647.4141034-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, 29 Jun 2022 19:26:46 +0800, Zhang Yi wrote: > When evicting an inode with default dioread_nolock, it could be raced by > the unwritten extents converting kworker after writeback some new > allocated dirty blocks. It convert unwritten extents to written, the > extents could be merged to upper level and free extent blocks, so it > could mark the inode dirty again even this inode has been marked > I_FREEING. But the inode->i_io_list check and warning in > ext4_evict_inode() missing this corner case. Fortunately, > ext4_evict_inode() will wait all extents converting finished before this > check, so it will not lead to inode use-after-free problem, every thing > is OK besides this warning. The WARN_ON_ONCE was originally designed > for finding inode use-after-free issues in advance, but if we add > current dioread_nolock case in, it will become not quite useful, so fix > this warning by just remove this check. > > [...] Applied, thanks! [1/2] ext4: silence the warning when evicting inode with dioread_nolock commit: bc12ac98ea2e1b70adc6478c8b473a0003b659d3 [2/2] ext4: check and assert if marking an no_delete evicting inode dirty commit: 318cdc822c63b6e2befcfdc2088378ae6fa18def Best regards, -- Theodore Ts'o