From patchwork Wed Oct 4 18:55:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409304 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 08775E7C4EC for ; Wed, 4 Oct 2023 18:56:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 993BD8D00AB; Wed, 4 Oct 2023 14:56:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 91C798D0002; Wed, 4 Oct 2023 14:56:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D2C58D00AB; Wed, 4 Oct 2023 14:56:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 586018D0002 for ; Wed, 4 Oct 2023 14:56:05 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 338831CA458 for ; Wed, 4 Oct 2023 18:56:05 +0000 (UTC) X-FDA: 81308683890.17.99102CD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf06.hostedemail.com (Postfix) with ESMTP id 68789180002 for ; Wed, 4 Oct 2023 18:56:03 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=SDZrwTkR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf06.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=1696445763; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=futZctVsmURmQGZ/KDgafuW1qDPP1YKGtvIp0lF1GQQ=; b=zWgGpKWlJX+c7Bz0WuWktZHPxeiPssY/PoaXLQ2g5mEKhvs7DiMNw28ABHxqa0qXjJtSw5 A/DqCjUCCjCu68oVoakBLY3QOKe1S9u+lyzVKXgIiiCYac/kl/qZXLSbOT+LOQ0Nk5hysd DVi8XQbK6m0uI5o3G3B/HtULaH/qcwA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=SDZrwTkR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf06.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=1696445763; a=rsa-sha256; cv=none; b=STbQcIqgLa2WRGBtMOhkKbe7uTvE81kmXndwlqADqd6v3xCxEQUizpECeKKwtFkm2xnR9b 0ZP7VO+QiVZ7w3JMQUQFP1rsS/HhwUFAWuFJMnlmSAPFPEh6YYrXzuFppjubzasF3fOcuf QOVSjboVIt+VvaLZEVR5N6g/XJ/5kh4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 431A661681; Wed, 4 Oct 2023 18:56:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C352C116A3; Wed, 4 Oct 2023 18:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445762; bh=sLBQkX6C3uZBg0HDRv8gvWKbTBaFbLFrj7RUWYAQhtM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SDZrwTkRfcCOZGW15481BzgRhMnUfqbehqGZ70SkT07TpnQHXu6UZfqn2H3DH/IgB NREMwV+WxrirSQUoJ/gwdJuN20x7Oz09gVp00C5J4jUQVvPa7HndP8pgLhpw+3XdE6 sgwldkiPDhzPzj2g3RqGA/gLpn5OXG2RxT2QYd/q9czrrGxn2+biB5bnvlPb+wW7mJ 1yXSUZIQbCkJJ9A+zsHeXrou8bbwxUhD+l+R1pwZkVAnrBM97dSGO7YTQ9XanaOiAq xtFzLLS3PpGLDldOhnDRuM8I6A6BQmH5bnq3JkmbbMZcpJWkhUCscVq82P/pMn/I9p +1GtWq5/j2IpA== From: Jeff Layton To: Alexander Viro , Christian Brauner , Linus Torvalds , David Sterba , Amir Goldstein , Theodore Ts'o , Eric Biederman , Kees Cook , Jeremy Kerr , Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Greg Kroah-Hartman , =?utf-8?q?Arve_Hj=C3=B8nne?= =?utf-8?q?v=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Mattia Dongili , Dennis Dalessandro , Jason Gunthorpe , Leon Romanovsky , Brad Warrum , Ritu Agarwal , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Gross , Jiri Slaby , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Ian Kent , Luis de Bethencourt , Salah Triki , "Tigran A. Aivazian" , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Joel Becker , Christoph Hellwig , Nicolas Pitre , "Rafael J. Wysocki" , Ard Biesheuvel , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Christoph Hellwig , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , Mike Kravetz , Muchun Song , Jan Kara , David Woodhouse , Dave Kleikamp , Tejun Heo , Trond Myklebust , Anna Schumaker , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Ryusuke Konishi , Anton Altaparmakov , Konstantin Komarov , Mark Fasheh , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Iurii Zaikin , Tony Luck , "Guilherme G. Piccoli" , Anders Larsen , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Sergey Senozhatsky , Phillip Lougher , Steven Rostedt , Masami Hiramatsu , Evgeniy Dushistov , Chandan Babu R , "Darrick J. Wong" , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Hugh Dickins , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Stephen Smalley , Eric Paris , Kent Overstreet , Brian Foster Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rdma@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, autofs@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-efi@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-hardening@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-trace-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-bcachefs@vger.kernel.org Subject: [PATCH v2 88/89] fs: switch timespec64 fields in inode to discrete integers Date: Wed, 4 Oct 2023 14:55:29 -0400 Message-ID: <20231004185530.82088-2-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185530.82088-1-jlayton@kernel.org> References: <20231004185530.82088-1-jlayton@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 68789180002 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4ftekhqcppoofdyz94gxqhu7d4kamxc3 X-HE-Tag: 1696445763-374042 X-HE-Meta: U2FsdGVkX1+knqXXJt+NqymujTc05yz/2HfEg7d8qFLQ7QzH1FuV01Z6tXY9AW7KkiF2C6Z63DZ944kN9jNixH+n3z/339pVIE0ZyBiNi8f3m32BFJOxXYVVWYO3O01HOdrCKKP1BSLXOReHyKJJyRhShx/X2WBcCFvwAPd3gVal+YJCQ9W0DHt3jCBG2Q6ZiNjV9i1FDpA/7PA0HLGng/OtjAugzgs24Zy5I2bjsvuexj1FsTuPJsL004XSojioOCbbGabNoRR540wrnHufapAQ2d7k6J4bEoGodDCWnYlV8CeIRprLq91GMBqmj3qw0alESNzzVzc2VvMmRb8fFD+yK/6eSrKy3xPhPOyImjRgVdee9uWP6lXKPBzZMrI66e8XUPg6NntVvfu2AIfSavZE8JnyToURyDeIJe+MapGv2MNnJlC6uAPfqfwerG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mu647cN+0EvZy7RV1CciC8Gz7+xhgvYIinF5TGMj+xDIcvnJV3StMcHfJ0rNuJpuz2+leNPWcxdBPAUcGluyuHnF7vQfcyxwIBNW3PAGPWetZgnePgnogeo24DE9vqS3OsLsgIrq3yx8gkClV2qLhX7MAZXDGpOYQ0VNo518sLUixA8fdWvnW4zB9IO4ehSPGynzhNXEN8ElqvKRKSo3FnuxtTtjI4MY75SUkV2AZlx98Jc22AzsX4MSUVDPDo1Tu3ER1Z2mnPaTieL4ow0xl6Q4Ld8LITGyu8J7Q2Eon2m76ID XNABRL5n HiMbOFKwtfZkq2vB/RGHTu0bBeDEk/n4Qln9u1YKN4Shuzh7fwwT7JCIk2rgeL3ZNmXXOuP+Q/2fsZjCvYSxaJe9NYM1u0ThzdW6+iOzJjZhYyyzaCQLyvyWq0p2sA8fNa/PWSMVlodasMQFHKem8mrW6y3XqMpHx8mzgErLWrrHkr+wo0zp9Bu944VWSUHenrs196Z900pT/8MKW0uJ6fqP4OtxwVIaYEpYHyidSNhJthj9XMCgeka5FgQAEyDfemyAIVqZB7DAep7aE/ebNijge1EdcujwrhlyqwAemuAdgM4i1tci6Ad1tGxDqxWoOoFzg7Hm9Nfx5StDrTiGz6epg0fuPlcIhqtKcWPT7bfg== 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: This shaves 8 bytes off struct inode with a garden-variety Fedora Kconfig. Signed-off-by: Jeff Layton --- include/linux/fs.h | 53 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 84fdaf399fbe..485b5e21c8e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -671,9 +671,12 @@ struct inode { }; dev_t i_rdev; loff_t i_size; - struct timespec64 __i_atime; - struct timespec64 __i_mtime; - struct timespec64 __i_ctime; /* use inode_*_ctime accessors! */ + time64_t i_atime_sec; + time64_t i_mtime_sec; + time64_t i_ctime_sec; + u32 i_atime_nsec; + u32 i_mtime_nsec; + u32 i_ctime_nsec; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; u8 i_blkbits; @@ -1517,23 +1520,27 @@ struct timespec64 inode_set_ctime_current(struct inode *inode); static inline time64_t inode_get_atime_sec(const struct inode *inode) { - return inode->__i_atime.tv_sec; + return inode->i_atime_sec; } static inline long inode_get_atime_nsec(const struct inode *inode) { - return inode->__i_atime.tv_nsec; + return inode->i_atime_nsec; } static inline struct timespec64 inode_get_atime(const struct inode *inode) { - return inode->__i_atime; + struct timespec64 ts = { .tv_sec = inode_get_atime_sec(inode), + .tv_nsec = inode_get_atime_nsec(inode) }; + + return ts; } static inline struct timespec64 inode_set_atime_to_ts(struct inode *inode, struct timespec64 ts) { - inode->__i_atime = ts; + inode->i_atime_sec = ts.tv_sec; + inode->i_atime_nsec = ts.tv_nsec; return ts; } @@ -1542,28 +1549,32 @@ static inline struct timespec64 inode_set_atime(struct inode *inode, { struct timespec64 ts = { .tv_sec = sec, .tv_nsec = nsec }; + return inode_set_atime_to_ts(inode, ts); } static inline time64_t inode_get_mtime_sec(const struct inode *inode) { - return inode->__i_mtime.tv_sec; + return inode->i_mtime_sec; } static inline long inode_get_mtime_nsec(const struct inode *inode) { - return inode->__i_mtime.tv_nsec; + return inode->i_mtime_nsec; } static inline struct timespec64 inode_get_mtime(const struct inode *inode) { - return inode->__i_mtime; + struct timespec64 ts = { .tv_sec = inode_get_mtime_sec(inode), + .tv_nsec = inode_get_mtime_nsec(inode) }; + return ts; } static inline struct timespec64 inode_set_mtime_to_ts(struct inode *inode, struct timespec64 ts) { - inode->__i_mtime = ts; + inode->i_mtime_sec = ts.tv_sec; + inode->i_mtime_nsec = ts.tv_nsec; return ts; } @@ -1577,34 +1588,30 @@ static inline struct timespec64 inode_set_mtime(struct inode *inode, static inline time64_t inode_get_ctime_sec(const struct inode *inode) { - return inode->__i_ctime.tv_sec; + return inode->i_ctime_sec; } static inline long inode_get_ctime_nsec(const struct inode *inode) { - return inode->__i_ctime.tv_nsec; + return inode->i_ctime_nsec; } static inline struct timespec64 inode_get_ctime(const struct inode *inode) { - return inode->__i_ctime; + struct timespec64 ts = { .tv_sec = inode_get_ctime_sec(inode), + .tv_nsec = inode_get_ctime_nsec(inode) }; + + return ts; } static inline struct timespec64 inode_set_ctime_to_ts(struct inode *inode, struct timespec64 ts) { - inode->__i_ctime = ts; + inode->i_ctime_sec = ts.tv_sec; + inode->i_ctime_nsec = ts.tv_nsec; return ts; } -/** - * inode_set_ctime - set the ctime in the inode - * @inode: inode in which to set the ctime - * @sec: tv_sec value to set - * @nsec: tv_nsec value to set - * - * Set the ctime in @inode to { @sec, @nsec } - */ static inline struct timespec64 inode_set_ctime(struct inode *inode, time64_t sec, long nsec) {