From patchwork Mon Aug 7 19:38:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13344818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4F34C001DE for ; Mon, 7 Aug 2023 19:39:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 420B16B0074; Mon, 7 Aug 2023 15:39:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A9EE6B0075; Mon, 7 Aug 2023 15:39:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 225316B007E; Mon, 7 Aug 2023 15:39:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 129946B0074 for ; Mon, 7 Aug 2023 15:39:56 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DBB70A06DE for ; Mon, 7 Aug 2023 19:39:55 +0000 (UTC) X-FDA: 81098323950.22.6C5456C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 0752D12000D for ; Mon, 7 Aug 2023 19:39:53 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cvOqFZBt; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691437194; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MgGrtlt5/f1+g7kF4pqnYOVA36sy9jl79OnrmuDJLJo=; b=6T9R7ZOcJ/gJUrErBVhx1Jzmh/61QaxqFWr6n8jq+9ud2cq5oe3PfGzNL0AKDebsXnl1p6 NnW9TO44snW2OCGGT80SnzFWfYksB4thuv5xh5oCq/ywki8mCU0vfGua/iQ9uFu902ZT9B eFmucptrXxug0sW5qLYpCvNzaXp4Hhs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=cvOqFZBt; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691437194; a=rsa-sha256; cv=none; b=KOZ+i6r1qL4++UbYi/j0/cUWIgLmKjgPPdBKdxcpNGkhi7IpJ9XxAdNWmN+UtYsiOiBK5W NUN6sA+Q8HuC0e6/fd0LgiMzRwDIoFQKW8peGFQdOMrguMORb+q6/d5xtJj3CYD5dhQhyO V8C7lSsnlFYACmsQP8kM6BKCdnMNhNA= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 33863621D3; Mon, 7 Aug 2023 19:39:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ED32C433CC; Mon, 7 Aug 2023 19:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691437192; bh=OzDnAOkFvdqmLBbFuJs/CLbN23QVgBEedYg5nk4xP+Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cvOqFZBtdtaUZUpcYT8YaLre5p00FbNuCj4U3qnBqbXM0xIZiA7wntOQvtwkVyYsY KzGPHHfNfeSagX//jmohNvYFm+rBns57CsQSi8EBkJHPSRhrZFT/BjhJZaM5mUMarX bymb2xPd0mApBaQcG7sD1IUhckW6N/LCVX49ha2NO5jL3KT5jPvgzVeVTUtPAxnWiK dM7ooX8FgUdfO8Pq4IPDz02iL29DbkONAJVmc5YAAa/XW37auYiCa14sJSBbDU2ME8 1Yyd+iGC1KcpMynDMsQYI8CRvGycMoa1dPssmnhNbpjlfyCvisRz0YkztzSP0nrAdx wLRgkNq83WixQ== From: Jeff Layton Date: Mon, 07 Aug 2023 15:38:41 -0400 Subject: [PATCH v7 10/13] tmpfs: add support for multigrain timestamps MIME-Version: 1.0 Message-Id: <20230807-mgctime-v7-10-d1dec143a704@kernel.org> References: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> In-Reply-To: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> To: Alexander Viro , Christian Brauner , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Chris Mason , Josef Bacik , David Sterba , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Greg Kroah-Hartman , Tejun Heo , Trond Myklebust , Anna Schumaker , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Kees Cook , Iurii Zaikin , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Sergey Senozhatsky , Richard Weinberger , Hans de Goede , Hugh Dickins , Andrew Morton , Amir Goldstein , "Darrick J. Wong" , Benjamin Coddington Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, Jeff Layton , Jan Kara X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=807; i=jlayton@kernel.org; h=from:subject:message-id; bh=OzDnAOkFvdqmLBbFuJs/CLbN23QVgBEedYg5nk4xP+Y=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBk0Ug+f9kdguq5TMBwkHk+cBAUTkwGtaz5BtdXB OuPQyDsL9iJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZNFIPgAKCRAADmhBGVaC FVU+EACRHWq/ok8Ci5soDBQDERlUIptXu4lEgbxup7TkwLUNnWrAdD6epDKSNEsW7DCyiz2IdS1 pGFVdR0NuWmsNAsV4apdFq8utofCuuQXFkShF4CGpObdFNxDJjMvsoXKFeW/E7fgIlv1w8tvl+M TZtcYLa5VLnkhenORjC9b3TlE8YCfiuxsrGTC8mYBJrtx5d9p30op1+bDdzyytFLNJLQlLWj14x j1oAiR8gG08J92of6XhtGMD0DtCossd3jSeVrC8OYlXA4vCmfZq6JtZhAw+CoNRKb+cOARV+9B+ SJr5nKCvKTzIuqmy7l7OMNEkKl8S2V9AJAwTild9ZW1Z2NAyOuSAeKhrWBFQMIPlWrhkCWsPn6K JuesJK2mMm/FyjTbn/I6u5siqSU+d61eK1yIU1rMkdJoxmydONqyifHcvL1HSrQrWIl2MdAApFE sPG4vDGwzddPezBep3zrdQxC6ZJab7utCrvAwfewI5O/GjTDxkX7FpjNTk1I212uzshngLd6djC Jrse0kdmFbO8tdzk0ywQY79OHNNTMRCNavw0Op2MIxwOIQ4yfXuQcnlaEFLrYX3pIwPe744NWnr cqzI6yqNIe8Y5zTQLAa6eRvH5OhjhgpJax5SPfaimHbaGB73Wa4hwyRmG2bufpcQYrEKNjYr5s0 glVbeH5wiH7pM1w== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 0752D12000D X-Stat-Signature: iuc4nimxibe4ryhdemipmrf54d3wo5a3 X-HE-Tag: 1691437193-724319 X-HE-Meta: U2FsdGVkX1+t2ZR84TjRx7iR+KMlRgQqFIYOFAXkmtwe2geUhScWXvsJIVTcHo9oNeMrDxQjqYVj3aXjK3BSgiOhBi2Dc1P/+TOef40nKE0etMyRdLHzG8DV3o87ko/S5cAZDZePA5N+QaH4lG2gmKH9awsYKprBa9ZPTBKQJ/iNISe8HocPuQK+KwYoYfn0hUp0mbor3loxPvM0jqasYoC8JPXHrSN/IYgUSoYWV49j9TvGGLqC0Fc8Dhhpff8dUNnHoQrr7SsC/5mA8abV++MRUo3ov11o3noitjYPm83fUn3VK7lfhsyyUYsqEu6ArZJUP4ocT1Bbc4FVG/4iKzFYr2rpg+rhN/VYa2GL5UGVmcp6HupwA8WWL2lP7YeOPBHXgwmiEQUzyuWYTSxJF7Dyhs8x7sdDi5GzDCtG+WTyw5zAAaT3UbkuHeElflvh+qGz86owmUSVRKDIkALDATbwgybULtIdzVG5zpVfDM7zYdyJKt1uUl/ODz1TWIH8yu8VV3qvuhJwTZ6kz6prSUIamwRgOJqQNyfiqJAOcfOUfelnmkbupKXEqBjGczh6pAD24F18POhNYB2xLUfBk+0FUlPiHXqHTEZzYrakyuAzn4LmCUbPgQ65cd4sXMKuqu8y9pzp7Kyi1QWEjtrB6EyV9kknGbLKOytR5ss5wAbW4VIt/+C7Jfh50V4BXJ2A/68VabkiuPT9zujE8qtFg1dBLlTxglaNblPhW64Vo7e9zXcSMbiPdoKAO76rj00Dx9pMPS1sPQCXia5PnDJRwsKdp+2/KGrnVB8kz1TUnzwunVgxD7qWRBukpvWpmrP8Ceyxv8ubLJTtn1IwNqQyYBQ328n6D/4axddgYhnibSRYTBS6FNj5y5CuGJHZ5tfh18FT4D9rCAUwY2yiQ35mo+/xCv9rZd/xlhUuI4dXKGRw1DjiYIjEMz+zRmbEOyEphLm9do8x6tTSWxifvaj eimFkNjw KLoOnlIwh3HF7vHVNQyzgAM0VqUYPFozYcjpYTwN707tgQwjYD558f1b0isKN0CY0w5RoJejL/kTP2phh8KXzOZchWlItgml1QMxJcUT7GDFY0zHW5wJNGw1Vp/fcQPIEnuniFc8WXjgczFx7npyjOj0Vn5wOJpsdwd+4yyvug2YBUQqjeuFdHTocWpifPp6YilTfQ7XvtBTKIEflX66vFiCt7AtaQXt9/Gy0p2s4EY2ACTlSuo03gO279tOkae9t0yZkYQyJtM5fVLWDPFYvwCJhi0n988xaSa2RziJYuW4H86KayOEXW3LzAL+U7L9FTXMUHbiXNIWAGcFSXreQMYYg+8yPIiYlgYUA X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Enable multigrain timestamps, which should ensure that there is an apparent change to the timestamp whenever it has been written after being actively observed via getattr. tmpfs only requires the FS_MGTIME flag. Reviewed-by: Jan Kara Signed-off-by: Jeff Layton --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 142ead70e8c1..98cc4be7a8a8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4220,7 +4220,7 @@ static struct file_system_type shmem_fs_type = { #endif .kill_sb = kill_litter_super, #ifdef CONFIG_SHMEM - .fs_flags = FS_USERNS_MOUNT | FS_ALLOW_IDMAP, + .fs_flags = FS_USERNS_MOUNT | FS_ALLOW_IDMAP | FS_MGTIME, #else .fs_flags = FS_USERNS_MOUNT, #endif