From patchwork Thu Sep 28 11:05:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13402657 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 44C53E732C2 for ; Thu, 28 Sep 2023 11:06:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D6D128D00AC; Thu, 28 Sep 2023 07:06:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D1C578D0038; Thu, 28 Sep 2023 07:06:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7BBF8D00AC; Thu, 28 Sep 2023 07:06:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A90648D0038 for ; Thu, 28 Sep 2023 07:06:44 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 77F7FC0BC3 for ; Thu, 28 Sep 2023 11:06:44 +0000 (UTC) X-FDA: 81285728328.16.2175E1B Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf13.hostedemail.com (Postfix) with ESMTP id 93F2B20028 for ; Thu, 28 Sep 2023 11:06:42 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LIvJMQV9; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of jlayton@kernel.org designates 145.40.68.75 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=1695899202; 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=AZYm+3IMy7PsScQJ1WtwjofEM45ISgwj290K5ddP3W4=; b=gotJAdYHhaVcFqFidV744W9Ij6eJy6mpQh8evCRFZolwH0ViKlLKxZ0DXBZWiOE5Bg/glc Nl7yZkFM2MTqJ6wJoxijakQeQW9GYZIVfafIXtqYiFgMxG+3zDBaZ7+8ZbUsPMTsINUP2Y 3yoph2uP6jVMnbQ1XoNE2AhwQjRCdGM= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LIvJMQV9; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of jlayton@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695899202; a=rsa-sha256; cv=none; b=xYCjvrInPFBJrjENPInZF+PAKpWyldWeptlX/hp48tqlZzkAl+FMi2Pys1W9EwRe5tyLwJ X6rNOkZfYhrmUBjosYzgsUa4hO+0ouRdwWXw+f3M4TAZCTQciiLMz4dHA0W3m+PrmTqUP0 +CfcOF4sRWJ8dGZY5GQMpeO3HXWkZDI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 0FB05B81BBB; Thu, 28 Sep 2023 11:06:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF540C4160E; Thu, 28 Sep 2023 11:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899200; bh=KcEb7Ur9VnfCswhdPaiHlW6A+8Un/231FkVSjN0vVmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LIvJMQV9gV0uW8yl32NSd4yb2599TLMQSz3pZ7A8RvzTMK+/pPweiGT83QuRE6Ap1 RJ4tHrEtdELF24JEcAXBlbRxCLgD4fFKMvaVxDYJKFUi3JGR08fTlWqCpRUQLEU1eL PLdctIni/gLihdwFGrq6SVBHRpLIcoURicUh3JGLAt4t51ztAQPhDNYHtf1HHGTOrp XAB3XmZIrDME0ElXf57Dd8FtxB0Uiap7czp3ZlR45ObMUeHSnxd6fREH7G/U4RgfCh xv1/nw1L9/w3ErqEe74BXlZqblyXh/mVR1R03Etd6mg/RnXyu8EBj+lRYoEkTAJg+R yYzEQo7GNicAA== 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 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 Subject: [PATCH 87/87] fs: move i_blocks up a few places in struct inode Date: Thu, 28 Sep 2023 07:05:54 -0400 Message-ID: <20230928110554.34758-3-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928110554.34758-1-jlayton@kernel.org> References: <20230928110554.34758-1-jlayton@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 93F2B20028 X-Stat-Signature: uu6txkx5p7918e4xsbep6d38qie7raox X-Rspam-User: X-HE-Tag: 1695899202-112605 X-HE-Meta: U2FsdGVkX1+ViPkNFJWcEMBjm4hlpCdcgxarut5VWrpOBHthzVQI3+p00FfSaiqvBPuSQmP5rJMllQcvJ8kx/3NEFEa2gKUVSdG+0i5RsvgV5bQwfudjWYlujKAE29GtoODtvkR9cIBP91UN5zrv0531MT7ledm1tDr7aIf/0dqCxvrNG5xHYVimnEoRbp35XHvXeD2yNk1fKHO6zcyhwwULlQJCR+2PfqlOArytSxB76QNnkJ4Gv00s49OheG66v1m7NJTpdiDeJTl+3lcHwQtMCWSHmgTI/aXgUAlHdiySyPwIlaDBSaGMLQa1QVnTW8L9DKk5v6XfTyLAkXvsgGarVxzNG8W84WLBH0BOSj5y4NwCaJVPW5RCC3dgr5+M13JOuLRjBqa8Z12r+Oc9kqalHxVXddGG1fQBZbS2mGYhsz9eAlW0hpViF16AqNgYRMHseHE5h9+McvAOXgErpZQ25e++1RBOBam/9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aBNtJbGgZoCE+llnd6WvHFVABF0J4kDn0YKnmPpvdLjFBGw8o0xKgUFHECW0z46y0LbG8eVHuvsWrfgCJdWvUJi6FHxfdiIM9PdfDPz6Dg1ig89LRZthSZHjS7Sk2A4AbW2/u49WXSHOAQMWtY/d5L2TCk3I+3cY+hKOmABwSqbl7VeWxiRR/G2Db9CV2akz2dtXiy0ZR/7GkES4C0lwuSVfyFrqPqUy6rYSrNJ6b19Vu4CNZ0YbL6F+aohR6KB 86PeSV9k WCgfZwZf+PalhYiWmWrVuuBSCtopkE7Q3hBVCXy+fXW8FmWsFbVtRUvB1JSwIo3NQHGse6Ya2aMXLZlGWQhBU1Gfr/HUDFCYlfhxiBNrGbL8f6Uz2ULwMP0cDIdABHwR/NXsnerg1TqSINb0rTHMwaAUgQbo77uMgCQGvTGcWgKEBfzpGBhxk82ShuXa2+Gxbamqwxekcmvwu7OJmVox2p6LUQo1K0CUwFWEMnds5OltJq4Cfmr3A9Sqw8NgHr8CZZK38XmjPJ3QlPYXrgL5szPbXhDAUjtsj4ZaRPgVGLTo0rdJZbNFvzQh529wnpBVVUp7o5KGaffjRa6iktsIRgG7f7NiXA2+DVJ6bU9rRvH99Gk/bchwYSmMzXz7XKexWFv51ML9ZWZ8xMmfEHJdrM 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: The recent change to use discrete integers instead of struct timespec64 in struct inode shaved 8 bytes off of it, but it also moves the i_lock into the previous cacheline, away from the fields that it protects. Move i_blocks up above the i_lock, which moves the new 4 byte hole to just after the timestamps, without changing the size of the structure. Signed-off-by: Jeff Layton --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index de902ff2938b..3e0fe0f52e7c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -677,11 +677,11 @@ struct inode { u32 i_atime_nsec; u32 i_mtime_nsec; u32 i_ctime_nsec; + blkcnt_t i_blocks; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; u8 i_blkbits; u8 i_write_hint; - blkcnt_t i_blocks; #ifdef __NEED_I_SIZE_ORDERED seqcount_t i_size_seqcount;