From patchwork Thu Sep 21 11:20:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 142891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5125764vqi; Thu, 21 Sep 2023 13:40:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEUEBFDlDU1gOKA/xUTJ17IaCDDU98GDNEQ7h4xJB6KPDH0PkSELFwEcODOgfVOy6iAJQY X-Received: by 2002:a17:902:c407:b0:1c3:1f0c:fb82 with SMTP id k7-20020a170902c40700b001c31f0cfb82mr6120994plk.41.1695328841854; Thu, 21 Sep 2023 13:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695328841; cv=none; d=google.com; s=arc-20160816; b=TKwZ2tRr+ZAlISOUgbDOiV9hUaCKl0T/J0qvBnICX1LizfG6BcJrPVU5dJYyz7Hlxf I2DQAsaiYiq/LJ19w3uXSS9/PPxUeZ6CaSsPlq5Kr3+cTc+uyJ+UGpKBzdv6r97gE354 peVipcKln0ce7P4IuK/fQWCovJiexRvsxZEnAlh3Mw9ZqBRKaXxWrLftdtFNOHz9xSVD Ny2uAoK8ynXLSu99a6sUxbo1ZIfDB2q45KAMGh1TlTts69NqP6xOS77XJJvTlAqeBSj7 wSIVXDq2RvITDcMdbdU+ApgppAHLdNKOASZ2JzQ2GY+0pzhGyDsfm/7IjBdNhdsle8BG 9kWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Fct0gyTE1cH2C46/4SzUY1PS18xhaln9a+APgC83q/g=; fh=iWT0Z5wXgPQt8f/nBKVrDhnSJA8xccxLi1IxeGLjSlE=; b=oJosrgxNSIuriNgZ9VhUE4EEsXZe15KTh7GEq1abfqbMVthEex/G6AQTWfCI28Cc+j xR3yCiSIZ+8kahOm0uQ/zP86DqZWi3GUPMTcLiYFZ98nxTcE2ZSc7pAh5dR1udPfVcBZ crOrCdKWFQ1ZU5/0Qa0/O53h7XQUnSJbxS3+xTsrSEjS8qUxVxzhW2/M2y/u3xg8jVq+ x+r1NTUMJRASOwTm6TosZP0p9fU6KggMPcCNb5W0wF0yf/TMn3BZMYQ4h/yi3gCgsPyF Nb7GP1R5y6AuczJNPFsz8xR0fthy8mLAsEa8MBLQ5e3XbCVlHFWeJ1wJV9o4cJFVtuwn neiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ODfSb6Ej; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c1-20020a170902c1c100b001bb0fdbfdc1si2137500plc.199.2023.09.21.13.40.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 13:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ODfSb6Ej; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id A6F9F8392331; Thu, 21 Sep 2023 13:03:40 -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 S231398AbjIUUDd (ORCPT + 28 others); Thu, 21 Sep 2023 16:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbjIUUC7 (ORCPT ); Thu, 21 Sep 2023 16:02:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA3055AD9; Thu, 21 Sep 2023 10:17:28 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7FB6C4AF76; Thu, 21 Sep 2023 11:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695295279; bh=fVVo5CGjmoTrDLohJ9ZKU62AzWMqTdXDrmh8HmbAnAw=; h=From:To:Cc:Subject:Date:From; b=ODfSb6EjfykZpE3HrSopjEK/BK1PyzLnKbNHkJIkcWyv4bGTmBj3ktIWfVePNGOWZ EEJgbpwrwKfkJ9kR9ajlB7VRsj4q8p0UpLaNhb3sbgGbSbR21o8d21jFlm2PtrL7kx yhVpj5nLUYhuW/exeh8DqEhrkJkItK6bTYf46L9ziCP/CvriLtx0cUpQ6rzFt1tKyY aagqktlEglO3q6N4+qtJUPH2b/n3H58zF8qWJd2V0cQmF1qm7zzJamzsqvV9WBBMop 3DtFA3fCa4tA596rTyE3Yff3Q0z7v0pxHp3R7bBLDX3saPfzexFaaVAitKVtNoyAVY TQv6gCiNkZrxQ== From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Jeff Layton Subject: [GIT PULL v2] timestamp fixes Date: Thu, 21 Sep 2023 13:20:46 +0200 Message-Id: <20230921-umgekehrt-buden-a8718451ef7c@brauner> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3925; i=brauner@kernel.org; h=from:subject:message-id; bh=j9lEKBPMAlQacBeEOeO4BOezmWwvVo5irFSmBZvb5CQ=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTyKAerzjBeL3nFMWUva7Kg2tuwP/WZSSyaDdfWSwccySsO M83uKGVhEONikBVTZHFoNwmXW85TsdkoUwNmDisTyBAGLk4BmMhjN4Z/ujpM2g6cx7INrxrxson//3 pZ8cMvXact0/4vLPp1zfu/H8N/F1WB82tyON8Yb+BS2v5Kamf/NKN5XVeDpphKF27bt/Q2EwA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:03:40 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777675429712677614 X-GMAIL-MSGID: 1777681135836409554 Hey Linus, /* Summary */ Earlier this week we sent a few minor fixes for the multi-grained timestamp work in [1]. While we were polishing those up after Linus realized that there might be a nicer way to fix them we received a regression report in [2] that fine grained timestamps break gnulib tests and thus possibly other tools. The kernel will elide fine-grain timestamp updates when no one is actively querying for them to avoid performance impacts. So a sequence like write(f1) stat(f2) write(f2) stat(f2) write(f1) stat(f1) may result in timestamp f1 to be older than the final f2 timestamp even though f1 was last written too but the second write didn't update the timestamp. Such plotholes can lead to subtle bugs when programs compare timestamps. For example, the nap() function in [2] will estimate that it needs to wait one ns on a fine-grain timestamp enabled filesytem between subsequent calls to observe a timestamp change. But in general we don't update timestamps with more than one jiffie if we think that no one is actively querying for fine-grain timestamps to avoid performance impacts. While discussing various fixes the decision was to go back to the drawing board and ultimately to explore a solution that involves only exposing such fine-grained timestamps to nfs internally and never to userspace. As there are multiple solutions discussed the honest thing to do here is not to fix this up or disable it but to cleanly revert. The general infrastructure will probably come back but there is no reason to keep this code in mainline. The general changes to timestamp handling are valid and a good cleanup that will stay. The revert is fully bisectable. Link: [1]: https://lore.kernel.org/all/20230918-hirte-neuzugang-4c2324e7bae3@brauner Link: [2]: https://lore.kernel.org/all/bf0524debb976627693e12ad23690094e4514303.camel@linuxfromscratch.org /* Testing */ clang: Ubuntu clang version 15.0.7 gcc: (Ubuntu 12.2.0-3ubuntu1) 12.2.0 All patches are based on v6.5-rc1 and have been sitting in linux-next. No build failures or warnings were observed. xfstests pass without regressions. /* Conflicts */ At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline. The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70: Linux 6.6-rc2 (2023-09-17 14:40:24 -0700) are available in the Git repository at: git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/v6.6-rc3.vfs.ctime.revert for you to fetch changes up to 647aa768281f38cb1002edb3a1f673c3d66a8d81: Revert "fs: add infrastructure for multigrain timestamps" (2023-09-20 18:05:31 +0200) Please consider pulling these changes from the signed v6.6-rc3.vfs.ctime.revert tag. Thanks! Christian ---------------------------------------------------------------- v6.6-rc3.vfs.ctime.revert ---------------------------------------------------------------- Christian Brauner (5): Revert "tmpfs: add support for multigrain timestamps" Revert "xfs: switch to multigrain timestamps" Revert "ext4: switch to multigrain timestamps" Revert "btrfs: convert to multigrain timestamps" Revert "fs: add infrastructure for multigrain timestamps" fs/btrfs/file.c | 24 ++++++++++-- fs/btrfs/super.c | 5 +-- fs/ext4/super.c | 2 +- fs/inode.c | 82 ++--------------------------------------- fs/stat.c | 41 +-------------------- fs/xfs/libxfs/xfs_trans_inode.c | 6 +-- fs/xfs/xfs_iops.c | 6 +-- fs/xfs/xfs_super.c | 2 +- include/linux/fs.h | 46 +---------------------- mm/shmem.c | 2 +- 10 files changed, 38 insertions(+), 178 deletions(-)