Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp21751rwe; Wed, 31 Aug 2022 15:32:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR4knZGQD8+nr/eTCXi7U/tW91FWWA/Qbhc6VIOnBgExi/5A/7EX+4oQ/vSx7ED9iYTlyaGc X-Received: by 2002:a05:6402:1446:b0:448:5081:efc7 with SMTP id d6-20020a056402144600b004485081efc7mr15541019edx.428.1661985145647; Wed, 31 Aug 2022 15:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661985145; cv=none; d=google.com; s=arc-20160816; b=cZYmApJsZN/AM3tA9YPtoOaaryM+PkPKFcOnpYfSUvcOWzTNQMql4VXNG6cnHFVTaC kd3T7m1jrJBsXm5jsMg/Yc1xPsoLC9rBN4f+IZVGTBMykAbiAOBPKQ2SuX/RHzC3sLQw mM2jDjrCSxMw0BXx8cA2YoqMdY3uhKykSLm75V8pyehEwVpyO052miu64koDIRL+auvj /1HGNe+NZtFQauOBuGxlrHM2w40bS9+6ychzT/kT+GJkAlQfVzMCYwhsfahkXG9OqW77 r8wfHebt8jzwwG8ObfitTbjP/Kxk5lfW94X0ZGzPn4xLXqWT00ladhVnTi42YQkWQgsA wx6A== 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:feedback-id :dkim-signature:dkim-signature; bh=WIYFoaMKZoiJHnHUDZlxG0jiUy1Dk24eCrFgiVdOiyk=; b=toI59AEYII2ZJCB6FRAGkbxbf166esYhKZT6j2IL2QaSh9urY9mSy2bItAJc/YvgOm wKdqGm+d90nTiwlDOqO4PCXFiSV3ksIPZwe7bjhpdH3EGTJ5DN4WqAcSreSVmKqb+2l/ Mr1FyVEOwPdmWBi2IQrk6lFLoPxtK9v9eIZOmCw4UWSgOLu+CUnbQvD9mLOlgk3OY78B QIPN1drbbFkOKvfTnQberihRncltKfNXulJN06TD5zeZN1o2ue0AW3pXkYu8xNY7vbyX 71zhrGvqGU/zoFgE6sYHyIGWbm8NDvU95d36iaPnUvC0sKekP7D5rYU9aoUkPbfAEmhl sGrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joshtriplett.org header.s=fm3 header.b=cqKWiLl2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=O9gAW2mG; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a0564021e8b00b004481f0f9abdsi381539edf.600.2022.08.31.15.31.43; Wed, 31 Aug 2022 15:32:25 -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=pass header.i=@joshtriplett.org header.s=fm3 header.b=cqKWiLl2; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=O9gAW2mG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbiHaWJN (ORCPT + 99 others); Wed, 31 Aug 2022 18:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiHaWJM (ORCPT ); Wed, 31 Aug 2022 18:09:12 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9038582D11; Wed, 31 Aug 2022 15:09:11 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5062C5C01A1; Wed, 31 Aug 2022 18:09:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 31 Aug 2022 18:09:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= joshtriplett.org; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1661983748; x= 1662070148; bh=WIYFoaMKZoiJHnHUDZlxG0jiUy1Dk24eCrFgiVdOiyk=; b=c qKWiLl2QVz/BiKw4yh4hFF813J5C30ZKIixDq59fAstDAsNhcFCsk41vOQoBIuPF GteoF56ydpmBeeiK3SFVRQS2JRVDdXO2HiyNykd15cW3Ys7NmapdqLpOotT/464l ouYoIxA8ZsQMxjotbLvI8NqcvgC/rGvhQ57Hoqqb6TkLQkvQz1es7nD33Mtkirwm jrDuPcMNuD3tE3TkXhN9RimS23tzytC6GYezS7H6kuCnCJpT0CgBgf65p8H+D5ix 0/MwWdbw9dE+KK1CFwqRgZ3CroFgxIFtpDWb/AaIQ59XMtcWpkOJvcfnSt3Oai8y Zkp9nozZIIgKaCI5S1voA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1661983748; x=1662070148; bh=WIYFoaMKZoiJHnHUDZlxG0jiUy1D k24eCrFgiVdOiyk=; b=O9gAW2mGnwtDMRwMaRX020Zt1+P3WrBjl5ydDY5ynikl hTeO2bqgxXXZkdFEeb70fvwza2Fob8yxFDn4lv5qrzGevrHSb+osjR13HmUrhQJR 6cat51cxS8iw1QNGueMuS3fDPMNQaTbctFgYxIEY8fjJRuW7bCsNJ9hiwed7HUj/ 2OOCPDDG3mciV1b7WXTvvjjUoYmuruIk0ZNvqbn2MCQgEpnGehvbe5t7JSxv1UAO tp7Vh/vYoKfF0jgRnDw4rbtYcZhjhoiDxRWG5UXE7ahpmyhlEk2Fv3FY+5Ywg/d6 7xYy3fG+VoUSv2wz/6cxiZpVeLW4xxIWJC9nFXpl1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekjedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheplfhoshhh ucfvrhhiphhlvghtthcuoehjohhshhesjhhoshhhthhrihhplhgvthhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpeduieegheeijeeuvdetudefvedtjeefgeeufefghfekgfelfeet teelvddtffetgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehjohhshhesjhhoshhhthhrihhplhgvthhtrdhorhhg X-ME-Proxy: Feedback-ID: i83e94755:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Aug 2022 18:09:06 -0400 (EDT) Date: Thu, 1 Sep 2022 00:09:04 +0200 From: Josh Triplett To: Lukas Czerner Cc: Theodore Ts'o , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: Don't run ext4lazyinit for read-only filesystems Message-ID: References: <48b41da1498fcac3287e2e06b660680646c1c050.1659323972.git.josh@joshtriplett.org> <20220803070001.iygdreewgveotfwx@fedora> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220803070001.iygdreewgveotfwx@fedora> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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, Aug 03, 2022 at 09:00:01AM +0200, Lukas Czerner wrote: > On Sun, Jul 31, 2022 at 08:24:53PM -0700, Josh Triplett wrote: > > On a read-only filesystem, we won't invoke the block allocator, so we > > don't need to prefetch the block bitmaps. > > > > This avoids starting and running the ext4lazyinit thread at all on a > > system with no read-write ext4 filesystems (for instance, a container VM > > with read-only filesystems underneath an overlayfs). > > > > Fixes: 21175ca434c5 ("ext4: make prefetch_block_bitmaps default") > > Signed-off-by: Josh Triplett > > --- > > Looks good to me. > > Reviewed-by: Lukas Czerner > > > Tested in a VM, with a read-only ext4 root filesystem. Confirmed that > > ext4lazyinit starts without this patch, and does not start with this > > patch. > > > > (For a future merge window, not the current one. Please let me know if I > > need to re-send this at a later, more convenient time.) Now that the merge window has been closed for a while, I wanted to follow up on this to see if it could get into next. > > fs/ext4/super.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > > index 845f2f8aee5f..20437acc8865 100644 > > --- a/fs/ext4/super.c > > +++ b/fs/ext4/super.c > > @@ -3973,9 +3973,9 @@ int ext4_register_li_request(struct super_block *sb, > > goto out; > > } > > > > - if (test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS) && > > - (first_not_zeroed == ngroups || sb_rdonly(sb) || > > - !test_opt(sb, INIT_INODE_TABLE))) > > + if (sb_rdonly(sb) || > > + (test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS) && > > + (first_not_zeroed == ngroups || !test_opt(sb, INIT_INODE_TABLE)))) > > goto out; > > > > elr = ext4_li_request_new(sb, first_not_zeroed); > > -- > > 2.36.1 > > >