Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp110982rdh; Sat, 23 Sep 2023 03:47:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiYQ8RgyCiJ6TFKy/fsGCkwesMfCyLKXRv55QtN+K4hJGP/CFl0YntRt7zHZj5R4XoimkG X-Received: by 2002:a05:620a:44c7:b0:773:e380:b38d with SMTP id y7-20020a05620a44c700b00773e380b38dmr2373187qkp.55.1695466062448; Sat, 23 Sep 2023 03:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695466062; cv=none; d=google.com; s=arc-20160816; b=Vw2UraeEhnK1LhzLOH+pnw8+lvR70jXKEosyFq+v0I9fRZhObMiRwBmH0ZrLDbGHUQ ZJWGmgsM7KNp8D5d2+N7fV3inJ6TTFIyM6twvVVJw0yK5vyjZ6xmQs+X0SysytRzKJWE qSWyz9tKi9Wo04LHBZy4dn6FjKGU1njiFfeiWl3p+AK87on3585+ERiILL5UDN1uG8OS IdZlA02OJBHIHynAplkrr0sGMspG2O2h7g1lcMx6gNb1Xbbpr/s8o8auZTs+EoR4gUit XKzc98G00s6DdiZhD02UEMlp0Uoo3kZKwCqgnEtW6sjxnfB+NFzYZP7RQVNjvgCsdLrG /8Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=Fgx42TGJn4SqLTc7ScZeuLRx1lxOlKBCJxp1VQ2ncDI=; fh=xOkjpRKvd4I3chshjn28yqw+esCMXjo7AECZWTwRS9M=; b=jckg9qrP3DKAw39S87clz3KKqHDPjh/pBQD94KI952nAsXD4cWaeDAqvFn2pNMjfdP 0u/01mkSMQVK0jxponqdqTlfhEltQaXZ4LCNUZprpAg68Czr7pdpZiNWAaJuR+MBMR0S P9XYm1bzRMw9dT2utN9VyLX13CEC6IKXyib/prKHL0NUxxtuIXK755hkjr58+QMkAAnL ADDkUVFpD0AG/e4vYa73jpTCF9x+R51Qwd1uZTJCazy5p8nN2lygi6thkv7osngsCanX HF2iLVFV8M9qNek/+9GvYWyFNHPWoSGaNK4+bmTTsHMocenCms3WUMjPCfnPo9ONEycJ 6gCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n8wR7Gtc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id cr8-20020a056a000f0800b00690d8405fe6si189476pfb.317.2023.09.23.03.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 03:47:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n8wR7Gtc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 96D88801DBB5; Sat, 23 Sep 2023 03:46:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230325AbjIWKqu (ORCPT + 99 others); Sat, 23 Sep 2023 06:46:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjIWKqs (ORCPT ); Sat, 23 Sep 2023 06:46:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 078A6194; Sat, 23 Sep 2023 03:46:43 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12512C433C7; Sat, 23 Sep 2023 10:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695466002; bh=Fgx42TGJn4SqLTc7ScZeuLRx1lxOlKBCJxp1VQ2ncDI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=n8wR7GtcQlt+Y6uw/B6vII1a/XDIbqd0UdQTMcjBUz2g0/VsKjSwI8inZLq+sX8Js ULXksUYHaRuq9sM6QZPqSeyfnv0+rUOLLpb3XQKnjBMkWnvk4waz4wbOzT3zAXsVM6 EpduFXU6dZSt62GUp0tVVT0Q6bNAwKte47YP3GE+uRNnbkovxlOv4VhAPaUGLhlguS EZRee95FVgikS3rPUEhLMdHe8BOnKlzpRssERL4H9tWHU26Xr4cvy0hjbGQx1rmsFJ K6rLlE4tGLEMaoshPe4L/ksS9Qpa6YtO2ji7zAGAC7LoVMMHIHcPyb+gMN/+Qn87oS HVwwCUdISOQAw== Message-ID: <5e3b8a365160344f1188ff13afb0a26103121f99.camel@kernel.org> Subject: Re: [PATCH v8 0/5] fs: multigrain timestamps for XFS's change_cookie From: Jeff Layton To: Amir Goldstein Cc: Alexander Viro , Christian Brauner , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Chandan Babu R , "Darrick J. Wong" , Dave Chinner , Jan Kara , Linus Torvalds , Kent Overstreet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-xfs@vger.kernel.org Date: Sat, 23 Sep 2023 06:46:39 -0400 In-Reply-To: References: <20230922-ctime-v8-0-45f0c236ede1@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 23 Sep 2023 03:46:56 -0700 (PDT) X-Spam-Level: ** On Sat, 2023-09-23 at 10:15 +0300, Amir Goldstein wrote: > On Fri, Sep 22, 2023 at 8:15=E2=80=AFPM Jeff Layton = wrote: > >=20 > > My initial goal was to implement multigrain timestamps on most major > > filesystems, so we could present them to userland, and use them for > > NFSv3, etc. > >=20 > > With the current implementation however, we can't guarantee that a file > > with a coarse grained timestamp modified after one with a fine grained > > timestamp will always appear to have a later value. This could confuse > > some programs like make, rsync, find, etc. that depend on strict > > ordering requirements for timestamps. > >=20 > > The goal of this version is more modest: fix XFS' change attribute. > > XFS's change attribute is bumped on atime updates in addition to other > > deliberate changes. This makes it unsuitable for export via nfsd. > >=20 > > Jan Kara suggested keeping this functionality internal-only for now and > > plumbing the fine grained timestamps through getattr [1]. This set take= s > > a slightly different approach and has XFS use the fine-grained attr to > > fake up STATX_CHANGE_COOKIE in its getattr routine itself. > >=20 > > While we keep fine-grained timestamps in struct inode, when presenting > > the timestamps via getattr, we truncate them at a granularity of number > > of ns per jiffy, >=20 > That's not good, because user explicitly set granular mtime would be > truncated too and booting with different kernels (HZ) would change > the observed timestamps of files. >=20 Thinking about this some more, I think the first problem is easily addressable: The ctime isn't explicitly settable and with this set, we're already not truncating the atime. We haven't used any of the extra bits in the mtime yet, so we could just carve out a flag in there that says "this mtime was explicitly set and shouldn't be truncated before presentation". The second problem (booting to older kernel) is a bit tougher to deal with however. I'll have to think about that one a bit more. --=20 Jeff Layton