From patchwork Tue Jul 25 14:58:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13326615 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 BCBFEC04E69 for ; Tue, 25 Jul 2023 14:59:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F0E26B0071; Tue, 25 Jul 2023 10:59:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A0016B007B; Tue, 25 Jul 2023 10:59:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0DAC6B007D; Tue, 25 Jul 2023 10:59:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D1DD76B0071 for ; Tue, 25 Jul 2023 10:59:20 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9B9F21A0E74 for ; Tue, 25 Jul 2023 14:59:20 +0000 (UTC) X-FDA: 81050442480.06.3137995 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id 9CEABA0021 for ; Tue, 25 Jul 2023 14:59:18 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OKVh6IhR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.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=1690297158; 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=6nWojr0hKqa4JaCj2j3XdG2IwZm8djxTYWn9rXHaZSQ=; b=PdRJoEf+3uQ9yCSJJgvnxhsRa1iz8Co3vhJ9MUZCCqTz/BTq/iHhdJj3fB70EHgfcSpdBh TuqfLDClkKDgb7k/728+bUM7P33XVQnNLlL6svuXbe9+abCTNVmgoZuF9OIuwSlqhvXFfg VUGOqC6Wxot9isHIzVdjC6rjsy8IcKc= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OKVh6IhR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.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=1690297158; a=rsa-sha256; cv=none; b=jLnP4l7Sp+hIKAExSzBqALUXeaKYT3IEkrGsI4Lm1PrLOxwW31AG+26aA8V5TKEShUg70C amu3uBOFDeut2ViqQ8dMEY/uvi7VBpQBQz2JK5Uf3Pjt8aY8Zk/tafrpkwPySCl1VLZxtw nDxwAwpcSsImve2qDv0kL5SO5jUi4NI= 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 C9414617AF; Tue, 25 Jul 2023 14:59:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE35C433BA; Tue, 25 Jul 2023 14:59:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690297157; bh=1/8G5JaqUI6KuuI2rdJCgZt0gS2ge3CDkWe83TSi7uM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OKVh6IhRvMPzZaUNNT/6mBAoahekKV8Su19ujYhua5dNsSJXGr2MngNtpKOYADlS5 Hcq3wM7FDUZ1AhwU5l0SkI1+lCCn8xOR0JJEjELHxkXsYQRXohxF15c8QjQl0Xm+Dp AabYaBtk81zigqO/ZNjxOWuBUbzqMLIiq+sCKRMr913CtPRA3nMy4ZQya2P+aMfBUm DfLibUhnVNjPNL0YkM5WeV2HMZF3SVAzWSiYRKfJIayN7D5eWYtRDof0ETICfcAJhP 1QdzIniwIyLPb29vjUNBQTa5/ioEZS6W4QeTzhNnSbuJelJPSwWTBbQCum2wVq78oc 3sGYY+SrEP5rg== From: Jeff Layton Date: Tue, 25 Jul 2023 10:58:17 -0400 Subject: [PATCH v6 4/7] tmpfs: add support for multigrain timestamps MIME-Version: 1.0 Message-Id: <20230725-mgctime-v6-4-a794c2b7abca@kernel.org> References: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> In-Reply-To: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> To: 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 , Alexander Viro , Christian Brauner , 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 , "Darrick J. Wong" Cc: Dave Chinner , Anthony Iliopoulos , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, 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-fsdevel@vger.kernel.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-xfs@vger.kernel.org, Jeff Layton X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=769; i=jlayton@kernel.org; h=from:subject:message-id; bh=1/8G5JaqUI6KuuI2rdJCgZt0gS2ge3CDkWe83TSi7uM=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBkv+Mkeyk/syoIEMjY8h9EHJqsxQ0aWd6cS3gVn sS0hR6R/6SJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZL/jJAAKCRAADmhBGVaC FYYkD/9ytQv3AFDwSgID22VN0gkInS/gdWOU/XMQQ111VBBi+jtoL8sLhVN5+hTN45+z+uGCwcK ELptnx+sw1zyhpa/86b54P+Vj5/WEHTeyw/CugTFYvMMoxwZw3ZF8vYg4M+6ynQZWEJf2tQTk2K tdiekC/jrc+9KjYzeRXXoAq7TsgQVc8u4/u2BW+1mdUZ98N9dl6u4nDXkARcLRI+LqNSqh9d6yO IxOufKgdLh3pGMAHW0q+fSoPiNMaAQfCgxRx5Zy5ia1ZTPZzU6Mby8JrQ1f7U5WMxcYwL5SocmN G1UQX9z0RwE31B3CXLu6imdPlx5v9rro+6PBLF3MSRTzzmiLn5NVhf3ASxqYHB88Pxb8/YrZ5Hf p/mwAO9pFriehz2pTk7gj/rsg8EUkXvtGxT5/Ud0BQecMRLtzeelj7BsIirEdqiFM+oyJieS+6R yLQRWQ90+womEnX2UOBBDcSKJ4IRMVFTxqfRtTbtj+avSSM1HsqYg0PG+ZTcD7VzonTutJSupea MDCgNVtA3BSf4FlJtanXc6obMiQXMpaMbvRF7g7ZZQQ+I6clgjwlo2maEMVCXlobjZ7og+2Vn/L zdsEdNjCGYRoIRNzoAeGM8rXQ6ra0wNwBlgnVC6G77t8+98CH+j80wmzcqQzAx9NPFqiEcsD79b 2pTWmlY/xVg/8Xw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-Rspamd-Queue-Id: 9CEABA0021 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: geskeubgqdzzmkb17kxhbka7hrsy4tec X-HE-Tag: 1690297158-792658 X-HE-Meta: U2FsdGVkX1+It0ue/MG+nC9ZhCWaJuhjHR+XXsJsyQQW2sIw9Rb6/lZnoNgOXQ7jv0oD/V+IHhO4AtDxH9OkTSUwHSwDojlyOd6kCLqAisaR+KdHIHdsE/LfCOdmI3gdEaWtjAOlGSlgxcP2IC80IL//2nEa04dffZrzTQEij+nLVqTJxyKV7IWYRH0t2/TBxog1Ja5yPcVSmDWDYMIBKUjGJWjrwxJ/3h5sCrVzqb4jKbYJBbNpGyZPKycNbUHsAJBxTRLtF+TmTFOTyjwbk0wCt8Xk2yJN3N8dPvKO2Q+XlUBGVo8KwgHXvQPgAryBx/tKKDlgHIrtNaUV2YPOtjZMm4hpxzRqtZ4vTLuiUP8WtEyUucMBMmZwge6ysatviVnWXyoSxzYqK/mfj26k/NfxI1hzfh1A1M+e05xsiNnBRZw9My5CW6AZkMbnV/X2hKPYWVxZfiyjYrD4XGAc/8xxQqEhiTk0+S7T4Zh7NMCVEmzSNxpvBMac4pc3ryePaXLQJN1+CUSPQI+g5eWNIco+BSzNBNAYbSobm/5Rc/h8Yoc+Tf5KI8L0rbxVd/46+yhMnjSalLjIo5pAzXkstAZdrDOAVws8qeylUb1APfRFdtRRNsft4RbV4OHuL+5NYB/OeHAoz8tI7vBCzuTwWttAaWZr9YhV+Wof8OFgL48HLgGgDClkyvax6SrIF1dSL0zmqhH7IYmZcQ504fUyKmILDNqmX8pdsMzntwjOqpc4N8TqcYSBOCFdUb0Q+XNjCsZEi4LlF9EKvRLg6A+48HAomIlhhrnY2VzykBkwOnvmk1kva8fFaLgYFP2x/UoHIFikpxDX8qb4ZGlD7R0BA+FFHcsnc/9ANb7RNwGnSIYERw5XzZBJa7xfYkv5GMz8vs1uMR011HruPyJZw3mWLZIl0XD08VoH/5I2F2Daf0CN45Jxqkc/39MFcy448fFlR28nfe34vK+U+gDZUP5 cAez2I0M 3d7ZWaS4jb9+A8Pc/R+KcEwo33+oinrLNrkCOEqJrYCaY9rRzY5gTWe1bpQMH60NO4MH2795DSGKHVzARY/mlY4f52uvaDxKjJwnOPmPQtwjxxezxc9DN1KY9nlak5F9u4uN+NEVzXVcQLPdfQT9jHdtNZdkono0olBh61XWk4lkW0/8AJdbcmg+R55gOcRbo1FflXhhYxjkZVl8aNCrWbBTXQsq6oI3oVzmrXtFDz1KFvhdwTjaJPz3wkPSih2ZGAXkKiIdotyxHa159IkZHnznCc1s7E4gixh1ddbIu3Bf+99x9rtgk7bFr/SyqcHqJfdWVubUuK+LPAY7eBTg2RDM1UxjTTyFKa1eY 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. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 654d9a585820..b6019c905058 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4264,7 +4264,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