Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp800904rdb; Wed, 1 Nov 2023 03:17:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvaQyLByMXCgN+GUBe5iC5fFNsS4NPSXYolbjfxljOzoN+SjS5DIhAes5FR0BnTMlquuWB X-Received: by 2002:a17:90a:19db:b0:280:9409:263 with SMTP id 27-20020a17090a19db00b0028094090263mr5393468pjj.43.1698833822557; Wed, 01 Nov 2023 03:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698833822; cv=none; d=google.com; s=arc-20160816; b=0ibsYaTas+URghEF6kXf233KoYr68MoInAc50UTM5gTpzjZbN4ZHTe0k5CDESHlhq6 J95/NdX2spnk1E+XflHk0rzQhDd3LOkNBfQzyHU3zNao+KbR07sekjvoa0nHVfubQtRV SO7Ap4DIU7hiCJwFJEoGmQ/j+ni01IbjEMfoA7ItjQDT2Ht1caFtbnmsQWJpRHa4vznQ WxkArnkOAnQZXi0SC2y8u6hZcYkhMtNxyUTyIf87Z7p3ZTar53pLgIzNCxJpdbwC2XVj gC8T0VCOgPH0N3QdOfHkwbQiYATR+Ja5+F4k2sfUv0WQOyUZtgxN2INt4JZ+u4O80ByB yvUg== 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 :dkim-signature; bh=CFpkczKLmbO7DBmC+KuusmYf1M81/8uEj5OEO9u0an8=; fh=rzJDK8zn0Nkd2yw+q7mCtmW3y3CDogUcNVmZtXDIlgI=; b=pXCQnfQoiitDbtHJha6TWRfSlCF7Q2E2tivxqz7WWyn6polOrt7Yuf+Rovee8stjpD aiv966kStzPqhqXyp5cHvC26mkfqokm7k1omAe32ETJ98exEYMjN9yfOYKnAljWjdjTb 66mROspzlhVdiRZnz/FPalVloHRkA6vQygnW93WZiwl4nSU4NboEl+5hwcWLr4U5jleM FuLcY0Qqg9lgLfcZ/SbLI7z90Ov2G6dd+iLdqGnxGy/njM7FLkmR/fhjtw5JTZcI7w51 g7O4ERMRbbwEmsUOjdnTjUbOyodMHvelXqXfztdzdLLSbWYrEUO3yVh7x+hqYcBuJTCu yYfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cIDBQeCe; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=mvEEW889; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id hk10-20020a17090b224a00b0028098f4dc5fsi551992pjb.106.2023.11.01.03.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 03:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cIDBQeCe; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=mvEEW889; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0B6EA809F396; Wed, 1 Nov 2023 03:16:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233728AbjKAKQ5 (ORCPT + 99 others); Wed, 1 Nov 2023 06:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233397AbjKAKQ4 (ORCPT ); Wed, 1 Nov 2023 06:16:56 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C15C102; Wed, 1 Nov 2023 03:16:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 80D4E21A62; Wed, 1 Nov 2023 10:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1698833809; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CFpkczKLmbO7DBmC+KuusmYf1M81/8uEj5OEO9u0an8=; b=cIDBQeCeT6F/rRtPtuWsaxhbXCw/Oy8Nd3TyqIdVXqkKWHuejYiCFHWbJG36hEldNK/gE3 PmAIxp18ujdwD778pBZ/fbbmaGxjbOGZeg065cemuCDzPnGNMI05uyPZkJArv7AoMBGwNW DccVThknuJ0/4feaYznjvdWoDckhhmY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1698833809; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CFpkczKLmbO7DBmC+KuusmYf1M81/8uEj5OEO9u0an8=; b=mvEEW889xoYvMMVwNIK0/VQCeU1UNx7tGnXGVlAFU0jWGpNvK1Hq0sOak6HpTutwkrFEmF VSu8elpoFbhhjyDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6E0F51348D; Wed, 1 Nov 2023 10:16:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +FrRGpElQmX8GwAAMHmgww (envelope-from ); Wed, 01 Nov 2023 10:16:49 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id EF5D5A06E3; Wed, 1 Nov 2023 11:16:48 +0100 (CET) Date: Wed, 1 Nov 2023 11:16:48 +0100 From: Jan Kara To: Dave Chinner Cc: Jeff Layton , Amir Goldstein , Linus Torvalds , 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 Subject: Re: [PATCH RFC 2/9] timekeeping: new interfaces for multigrain timestamp handing Message-ID: <20231101101648.zjloqo5su6bbxzff@quack3> References: <2ef9ac6180e47bc9cc8edef20648a000367c4ed2.camel@kernel.org> <6df5ea54463526a3d898ed2bd8a005166caa9381.camel@kernel.org> <3d6a4c21626e6bbb86761a6d39e0fafaf30a4a4d.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 03:16:57 -0700 (PDT) On Wed 01-11-23 08:57:09, Dave Chinner wrote: > 5. When-ever the inode is persisted, the timestamp is copied to the > on-disk structure and the current change counter is folded in. > > This means the on-disk structure always contains the latest > change attribute that has been persisted, just like we > currently do with i_version now. > > 6. When-ever we read the inode off disk, we split the change counter > from the timestamp and update the appropriate internal structures > with this information. > > This ensures that the VFS and userspace never see the change > counter implementation in the inode timestamps. OK, but is this compatible with the current XFS behavior? AFAICS currently XFS sets sb->s_time_gran to 1 so timestamps currently stored on disk will have some mostly random garbage in low bits of the ctime. Now if you look at such inode with a kernel using this new scheme, stat(2) will report ctime with low bits zeroed-out so if the ctime fetched in the old kernel was stored in some external database and compared to the newly fetched ctime, it will appear that ctime has gone backwards... Maybe we don't care but it is a user visible change that can potentially confuse something. Honza -- Jan Kara SUSE Labs, CR