Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1552108rwd; Thu, 8 Jun 2023 21:25:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cNdAxZ6Z4cWdRFPc/3c/oYIIZQoT49KNEYPHnoyK+arYcS8Zis46qLbdoe7dYw2bWRGo+ X-Received: by 2002:a05:6808:1988:b0:398:9fa:655e with SMTP id bj8-20020a056808198800b0039809fa655emr572453oib.31.1686284732517; Thu, 08 Jun 2023 21:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686284732; cv=none; d=google.com; s=arc-20160816; b=nJ1zzfGfd0oFstIj4BErjD8i4PdTSegmM5F2fosJCrRIHQ4FP/doA7+dTZpLDEdiya ysyplWmK/11VSyJqSmR3rIddJGSxOMRhGNE3Ou/Eo3y1Bjfnv+9WpBSLq5A7A1SL6rWN mDAKtWMZKGhcprWRikmLrzwXqMj8OayyiyAHdhL1HmpVP/8K2Rt6iST2zxNVcmOG5MCN MPQtnuk8kja7I429EC33C/sPegSdOzbEvKWs50xFYx3v12ADTLrli9eu8ucVTE2hiLP2 eRneMk9+Q1Qxls0KKNrxy0ti3JUXCxHCL37H6goJlseGOfexHMYBviM/o9Eo1jKNuyvw jLSg== 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:dkim-signature; bh=34REo61Nl0uQhftBRwVC+HCzlzV7sx/psofbzn5aCz0=; b=UFYLoDxAS1rkh66pP7+20+hWyONN3wScgTBKHCYQoF1gNaSd/t36leZT9B2OMC9YAf Ut6OwzEbjX09giPP5mF4G+6sMTyTAXgOR1So1Gt8W1CmpOIGHXbItJ6xa3hYdFcXz2Bd Dg+KKmgRS/WyMXQrALUEKVehy10DhbMa3sTtWf9GV0dLbcqv36TxBOGaHhiSJoduqC/C BMCeo3dK3U9JUyK8gBbLxXHfeBNqLin2EdqMRzbo98jTk9l2ddfoN1pLnUGe5DOeST7a kRBg8yGoXm4mGcxKoNGQKNQ7bcqIdkWSl1QE3VWOLStQEBtv7OCV+Ocrw9j+YSGfFITj UeGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=e9pfDM3a; 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 j14-20020a170903024e00b001ac6e1fd203si2096968plh.180.2023.06.08.21.25.14; Thu, 08 Jun 2023 21:25:32 -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=e9pfDM3a; 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 S237095AbjFIEWu (ORCPT + 99 others); Fri, 9 Jun 2023 00:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjFIEWs (ORCPT ); Fri, 9 Jun 2023 00:22:48 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8631330CF for ; Thu, 8 Jun 2023 21:22:47 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-82-39.bstnma.fios.verizon.net [173.48.82.39]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 3594MeXV023922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Jun 2023 00:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1686284561; bh=34REo61Nl0uQhftBRwVC+HCzlzV7sx/psofbzn5aCz0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=e9pfDM3a6Nn5Wikzm3ZKQkXBK5Y0PQkvDcZh/dAHlItZpUmprcsT7uRxNiJICmaLg F9Cze5L0AXgW/2a5VM8CxL/nw+zYtoSDXG5CdbFWv0mXX/IBlGMZeLP1fY6I3jDfB8 XuVcx6Pe6T5MUkW3t+7a5UfDPcYUvFnYcKQDvTfBYgDVQPnBaCaXDSGZxDNhTN3fwO Ps0UeOMsyO+aq2ZOXrsi1JpSyA16U24QgJGNv4qG3WB7OpjkofAR0X0kjnZNUBzlvu 7e6J72BAxzFaqwrRYpg16Mfq4DD6DHcyCOJYBf9GKGW6Kq5a/iBFuzJleysXP6KbCg rxS7LURaq5cDg== Received: by cwcc.thunk.org (Postfix, from userid 15806) id E9A0915C00B0; Fri, 9 Jun 2023 00:22:39 -0400 (EDT) Date: Fri, 9 Jun 2023 00:22:39 -0400 From: "Theodore Ts'o" To: Krister Johansen Cc: linux-ext4@vger.kernel.org Subject: Re: [e2fsprogs PATCH] resize2fs: use directio when reading superblock Message-ID: <20230609042239.GA1436857@mit.edu> References: <20230605225221.GA5737@templeofstupid.com> <20230607133909.GA1309044@mit.edu> <20230607185041.GA2023@templeofstupid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607185041.GA2023@templeofstupid.com> 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, 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, Jun 07, 2023 at 11:50:41AM -0700, Krister Johansen wrote: > The growpart / resize2fs in the reproducer are essentially verbatim from > our system provisioning scripts. Unless those modify the UUID, we're > not taking any explicit action to do so. Ah, OK. OK, I'm guessing that your system provisioning scripts are attempting mess with the file system a lot (creating, deleting, etc.) files while trying to run resize2fs in parallel, then? As far as your patch is concerned, resize2fs can do both off-line (unmounted) and on-line (mounted) resizes. And turning direct I/O unconditionally isn't a great idea for off-line resizes --- it will really trash the performance of the resize. Does this patch work for you instead? - Ted diff --git a/resize/main.c b/resize/main.c index 94f5ec6d..f914c050 100644 --- a/resize/main.c +++ b/resize/main.c @@ -409,6 +409,8 @@ int main (int argc, char ** argv) if (!(mount_flags & EXT2_MF_MOUNTED) && !print_min_size) io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE; + if (mount_flags & EXT2_MF_MOUNTED) + io_flags |= EXT2_FLAG_DIRECT_IO; io_flags |= EXT2_FLAG_64BITS | EXT2_FLAG_THREADS; if (undo_file) {