Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1706059rda; Tue, 24 Oct 2023 00:08:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH74YkNV/TKX6S5NeLrhr90IU2SK1AUx2qfT6Jbaus27/KzSUC8zYrKo/IkIKZuAveVxxUc X-Received: by 2002:a05:6359:6513:b0:168:e636:aa2e with SMTP id sk19-20020a056359651300b00168e636aa2emr2793399rwb.10.1698131334852; Tue, 24 Oct 2023 00:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698131334; cv=none; d=google.com; s=arc-20160816; b=ylwpF31ikbB4VCPWyK0mBLgRJEX6g+ZsRXqSxAmFhGRApktUpWq1bBzbFWDGsqUDDB CqlrrZvo1dkofZmTuMopKRdJAUzbOkgqHW0+kyvn3HCv86kIObXmQhKAMnTgpB0HAKKG rDncIma1IbNtbKsrmw54/5oVOLDWViLCPHxvFaJrqdmAtjjVeZtOkA8LlCfj89sgXoLY qdlWEUail3d7U2ilRa7NVxA/uwF78OCZYX7IJ33pc8S+7LhVr+jre2MsdW0FWK2auw+2 bQT0uh2Pcis+P+Pfq6WuyHgd8jjal+cHNCLWO/YV4Rw61tC+0FoTpRK6ukRGFjj3x9ay GRDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SqdvkUsqWd4zu3IEIRbwUNktCPDbd/gk6A5nLT4VIeM=; fh=yjIHETayRiNSEQEvPtJajswvon/j6Az7lhYJ8zhdTYk=; b=gZbUNraDfp+8uZmmGaDyfvyyUeSt6f7PulXZO3fU6YQOfo+P+O/c/um/B8EtLmMpL2 YZ3cdkbCKFFQypabiCbGHkTlRW+ZWAmmvrsbiCVR66CkqpeWCzCTfn3bLwqkzwZRxqU+ v7lOA/lKV4KOlPedKUGYig+W13UH2ALquoWUms28UPcM9t8jSYMYiTQxCw/sqdhTALpY lu4nh0pybA5Ge63rp7NRlEwigpseXYJ62jUaYnDftRL0WmWojuYm4z8b9TiZOufhgCHD sZSQsKVUChFpOiaNVgITI7JG/89c8XbPZ5NRChN4zYRTrm9zhcz1VWQp8NnGrnObhmk5 8pGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FkuzKWGP; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y7-20020a636407000000b00565ecee8793si7785631pgb.875.2023.10.24.00.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 00:08:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FkuzKWGP; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 532CD80A9AAC; Tue, 24 Oct 2023 00:08:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232499AbjJXHIn (ORCPT + 99 others); Tue, 24 Oct 2023 03:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232398AbjJXHIm (ORCPT ); Tue, 24 Oct 2023 03:08:42 -0400 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60402118; Tue, 24 Oct 2023 00:08:40 -0700 (PDT) Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-66d0ea3e5b8so28240466d6.0; Tue, 24 Oct 2023 00:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698131319; x=1698736119; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SqdvkUsqWd4zu3IEIRbwUNktCPDbd/gk6A5nLT4VIeM=; b=FkuzKWGPgKu23f7MQ6y7O95S5s8tdJxnEbTm32ctOfOzqfZw7wYlQ2m+cQebQCvLmI QdA81shifDt2PODrds6dL+fS7CXobtOJCrjpR6bG7dbnqTbba20b86rafCdcSTgR/Yyi KzSHzflOfAjLM2oAOpuInTpgoRIjN73+gB70dH5KP1MKe/mVp8Smo8dLW+Vl/yJcO+tw x3qxY8+uEOiMj50y9K1UEbNMMdyd7u0+YttX0ItYMBsV9yKRN/Tkedh1b/9VeZK5b99n He/6UcX91drwZ24+2yQtdX/e1Wv5PULL+1PepPdkeFoREss0CjJrH3ThxhlylPut3C+j ZTVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698131319; x=1698736119; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SqdvkUsqWd4zu3IEIRbwUNktCPDbd/gk6A5nLT4VIeM=; b=NkEpQjSoPD02q96gAuiLXCwVsdB03WrXXvWt/qHtUYGeWVvS2Bam1So3U1/5ingnnE MViCUCkh/KACYZodogDDXXtIEdxr793RkFpEi3WIjMAlKGagpq7br7iFApD14Htz4wbC sIgT0eZJbNtXprhehOU/aZOnCuKyCESJpLETvndw5OUtg/lodN0SXWO0J+3UyzSyEfzJ jicRp82Ox19E+35RtfgT+ke9gdjMJLDvzrwpNxs69o84ZsudXimUaGyH8XWuIyMTe6Fq piwtM24i5NI39wmAuYESGr0FRvb1sE7RqGRbe6gM1DRz5vOJ4pqqozKNRwsTq7jtvHTm TOOQ== X-Gm-Message-State: AOJu0YyG7MvE0y3hL5cdKABpm48QPrTnT6hVCTG2qoAOdUeNh3TSJg2n dVnZM2byIrYgctYY8om2S5gHu0XtNmHRZBrpzp4= X-Received: by 2002:a05:6214:224c:b0:658:7441:ff1b with SMTP id c12-20020a056214224c00b006587441ff1bmr14513785qvc.45.1698131319478; Tue, 24 Oct 2023 00:08:39 -0700 (PDT) MIME-Version: 1.0 References: <5f96e69d438ab96099bb67d16b77583c99911caa.camel@kernel.org> <20231019-fluor-skifahren-ec74ceb6c63e@brauner> <0a1a847af4372e62000b259e992850527f587205.camel@kernel.org> <61b32a4093948ae1ae8603688793f07de764430f.camel@kernel.org> In-Reply-To: From: Amir Goldstein Date: Tue, 24 Oct 2023 10:08:28 +0300 Message-ID: Subject: Re: [PATCH RFC 2/9] timekeeping: new interfaces for multigrain timestamp handing To: Dave Chinner Cc: Linus Torvalds , Jeff Layton , Kent Overstreet , Christian Brauner , Alexander Viro , John Stultz , Thomas Gleixner , Stephen Boyd , Chandan Babu R , "Darrick J. Wong" , "Theodore Ts'o" , Andreas Dilger , Chris Mason , Josef Bacik , David Sterba , Hugh Dickins , Andrew Morton , Jan Kara , David Howells , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 24 Oct 2023 00:08:48 -0700 (PDT) On Tue, Oct 24, 2023 at 6:40=E2=80=AFAM Dave Chinner = wrote: > > On Mon, Oct 23, 2023 at 02:18:12PM -1000, Linus Torvalds wrote: > > On Mon, 23 Oct 2023 at 13:26, Dave Chinner wrote: > > > > > > The problem is the first read request after a modification has been > > > made. That is causing relatime to see mtime > atime and triggering > > > an atime update. XFS sees this, does an atime update, and in > > > committing that persistent inode metadata update, it calls > > > inode_maybe_inc_iversion(force =3D false) to check if an iversion > > > update is necessary. The VFS sees I_VERSION_QUERIED, and so it bumps > > > i_version and tells XFS to persist it. > > > > Could we perhaps just have a mode where we don't increment i_version > > for just atime updates? > > > > Maybe we don't even need a mode, and could just decide that atime > > updates aren't i_version updates at all? > > We do that already - in memory atime updates don't bump i_version at > all. The issue is the rare persistent atime update requests that > still happen - they are the ones that trigger an i_version bump on > XFS, and one of the relatime heuristics tickle this specific issue. > > If we push the problematic persistent atime updates to be in-memory > updates only, then the whole problem with i_version goes away.... > > > Yes, yes, it's obviously technically a "inode modification", but does > > anybody actually *want* atime updates with no actual other changes to > > be version events? > > Well, yes, there was. That's why we defined i_version in the on disk > format this way well over a decade ago. It was part of some deep > dark magical HSM beans that allowed the application to combine > multiple scans for different inode metadata changes into a single > pass. atime changes was one of the things it needed to know about > for tiering and space scavenging purposes.... > But if this is such an ancient mystical program, why do we have to keep this XFS behavior in the present? BTW, is this the same HSM whose DMAPI ioctls were deprecated a few years back? I mean, I understand that you do not want to change the behavior of i_version update without an opt-in config or mount option - let the distro make that choice. But calling this an "on-disk format change" is a very long stretch. Does xfs_repair guarantee that changes of atime, or any inode changes for that matter, update i_version? No, it does not. So IMO, "atime does not update i_version" is not an "on-disk format change"= , it is a runtime behavior change, just like lazytime is. Thanks, Amir.