From nobody Fri Jun 12 21:11:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 767A73CB8FB; Tue, 12 May 2026 16:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602378; cv=none; b=RIswXdq9nJA6cBfrtXKEsVg4PcAbjoSXG5HYdd44q9lXvOaftK0FOr4x8gJ9ep9KN+vJV0dP4DZPb1yMVW9TyDJpl1MV1qxAWWCThXA62W2LMPVlPUM6aNzPgdWxrkk95H5HfPBNLleznjzA0WDw9Jpz7zMQTU2cmZqTEev3t9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602378; c=relaxed/simple; bh=cgcE1HWrmofLgMn+CBox+LmXA2jqLJ864+I//yGbd1c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ibs6jrF2N3c035OOAOhPim47QTTVtvh7Vrer9dBpTeDPls8/kbbLZDXU4Xdx5FqCm/jVcC2VTqYBeuQwwko3gArgaQ4j3oOLlWt0CBx14d10uckmDm1Q1vyCV5xQUhBli4b+4zWqTVCr6EoBfpjatsPv5PsdmrjMhGezB55m1oo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZXnyBjth; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZXnyBjth" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE73C2BCC7; Tue, 12 May 2026 16:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778602377; bh=cgcE1HWrmofLgMn+CBox+LmXA2jqLJ864+I//yGbd1c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZXnyBjthfMXaYLda+Sor6DkNQ2DCYzr+fINYWIdPNjgbS7fC7UVYNjAkMA/1f1elu ELXGDM/BSrBakHj5kN/mgYeEn8B/Z2/V3x4+ScYLOZWXAlbYSkqncb70mF8h1IfebU UgSNfirdkreOwlrpXC6yL7j/uCkMEeKKMcVasb6vjxflidetzLwM+fAqePtDOJ4SHp ke+bV+mrz4QtIEB1txwRyS1Kgtuq7Mfxf3FAKLyQ9j1rmSHEIRD1rrVKqMuqRVrbye Py9nh5Th345bg1Lfw0V5p3ftqX4VeYFmL+InmhQ6hQRYQDfNUdmj59z5DKH2/9FjkH shhhlcKgZA/Dw== From: Jeff Layton Date: Tue, 12 May 2026 12:12:42 -0400 Subject: [PATCH 1/4] nfs: store the full NFS fileid in inode->i_ino Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260512-nfsino-v1-1-284720522f4c@kernel.org> References: <20260512-nfsino-v1-0-284720522f4c@kernel.org> In-Reply-To: <20260512-nfsino-v1-0-284720522f4c@kernel.org> To: Trond Myklebust , Anna Schumaker , Jonathan Corbet , Shuah Khan Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5075; i=jlayton@kernel.org; h=from:subject:message-id; bh=cgcE1HWrmofLgMn+CBox+LmXA2jqLJ864+I//yGbd1c=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBqA1GHnWZYs9HOiLeDsP0C6a9A01xAgzdvG3lHy CPoYWION0eJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCagNRhwAKCRAADmhBGVaC FXYxEADF3Wf1FQl+4xsgQEPe42ieLseAHlbxRQFW5dnhKRxU5oMliajgSOGfspHDcstHYcTQd3V 4BSxRt1op1x8AeTxMIeaB9CqL4NgxIQI5vyzNEB3Qub8WQDsrwrrZs1iMMXTOlvBeeI4+zARdox Ep7LEJfajev0Q/gzUhV2WJRk4xp+vLC2y+gPb9o0U9ukYqzgRFIh6CmFhvW/nM4cYHVejrmpOQ/ /DV2rHRKrm+kAblMGl+bC/PijGHNz3+Mfz9M/ecbAAob1rMXfXck/BygpxhseDN5EEDQ5Sak+/L 5hfGXSK3A3baSnNZLqspBMUt4Kp5RCCFWigdNWYBzFaYR+Gz9Ey4zwZchFG1xlHAp3bMAtRdYPF 6LM9g70QK/3A5Fh+9TgQr6f6NqqVgQsKCPMgIVmRn2K7IevPy3N8PEZVckBnctiQHr/Za1IJQ+w 9Gmf2BqeLEMaTP756RDnMYrSXPLbsfZYQ4HJ15ba3CfMu6upUowi4+LG25byJPowX8X6E/4OqKe fiUI+X9geK0DCwQqPTxp5+bStCftfP6mOgExrsoZY86KmIGYwb0WWwH1URihgUWkteVbL6cKz+L K8aP+Ix8JjKG0HTOMbHcA622upRJalVTJbZ0I2VhQBLE8fvKahhP1NNa3zd0gwKNNBxq2iRagxQ E0dxqH7IZhoO4Pw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Now that inode->i_ino is a 64-bit value, store the full NFS fileid in it directly instead of an XOR-folded hash. This makes NFS_FILEID() and set_nfs_fileid() operate on inode->i_ino rather than the separate nfsi->fileid field. Since iget5_locked() and ilookup5() now accept a u64 hashval, pass the full fileid as the hash parameter directly. Convert direct nfsi->fileid accesses in nfs_check_inode_attributes(), nfs_update_inode(), and nfs_same_file() to use inode->i_ino. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton --- fs/nfs/dir.c | 2 +- fs/nfs/inode.c | 25 ++++++++++--------------- include/linux/nfs_fs.h | 4 ++-- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e9ce1883288c..5f8c3ea0bce3 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -650,7 +650,7 @@ int nfs_same_file(struct dentry *dentry, struct nfs_ent= ry *entry) return 0; =20 nfsi =3D NFS_I(inode); - if (entry->fattr->fileid !=3D nfsi->fileid) + if (entry->fattr->fileid !=3D inode->i_ino) return 0; if (entry->fh->size && nfs_compare_fh(entry->fh, &nfsi->fh) !=3D 0) return 0; diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e26030e73696..dd9e378c36fb 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -66,10 +66,10 @@ static int nfs_update_inode(struct inode *, struct nfs_= fattr *); =20 static struct kmem_cache * nfs_inode_cachep; =20 -static inline unsigned long +static inline u64 nfs_fattr_to_ino_t(struct nfs_fattr *fattr) { - return nfs_fileid_to_ino_t(fattr->fileid); + return fattr->fileid; } =20 int nfs_wait_bit_killable(struct wait_bit_key *key, int mode) @@ -313,8 +313,7 @@ struct nfs_find_desc { }; =20 /* - * In NFSv3 we can have 64bit inode numbers. In order to support - * this, and re-exported directories (also seen in NFSv2) + * For re-exported directories (also seen in NFSv2) * we are forced to allow 2 different inodes to have the same * i_ino. */ @@ -413,7 +412,7 @@ nfs_ilookup(struct super_block *sb, struct nfs_fattr *f= attr, struct nfs_fh *fh) .fattr =3D fattr, }; struct inode *inode; - unsigned long hash; + u64 hash; =20 if (!(fattr->valid & NFS_ATTR_FATTR_FILEID) || !(fattr->valid & NFS_ATTR_FATTR_TYPE)) @@ -456,7 +455,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, st= ruct nfs_fattr *fattr) }; struct inode *inode =3D ERR_PTR(-ENOENT); u64 fattr_supported =3D NFS_SB(sb)->fattr_valid; - unsigned long hash; + u64 hash; =20 nfs_attr_check_mountpoint(sb, fattr); =20 @@ -479,10 +478,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, s= truct nfs_fattr *fattr) struct nfs_inode *nfsi =3D NFS_I(inode); unsigned long now =3D jiffies; =20 - /* We set i_ino for the few things that still rely on it, - * such as stat(2) */ - inode->i_ino =3D hash; - /* We can't support update_atime(), since the server will reset it */ inode->i_flags |=3D S_NOATIME|S_NOCMTIME; inode->i_mode =3D fattr->mode; @@ -1672,10 +1667,10 @@ static int nfs_check_inode_attributes(struct inode = *inode, struct nfs_fattr *fat if (fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) return 0; /* Has the inode gone and changed behind our back? */ - } else if (nfsi->fileid !=3D fattr->fileid) { + } else if (inode->i_ino !=3D fattr->fileid) { /* Is this perhaps the mounted-on fileid? */ if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) && - nfsi->fileid =3D=3D fattr->mounted_on_fileid) + inode->i_ino =3D=3D fattr->mounted_on_fileid) return 0; return -ESTALE; } @@ -2262,15 +2257,15 @@ static int nfs_update_inode(struct inode *inode, st= ruct nfs_fattr *fattr) if (fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) return 0; /* Has the inode gone and changed behind our back? */ - } else if (nfsi->fileid !=3D fattr->fileid) { + } else if (inode->i_ino !=3D fattr->fileid) { /* Is this perhaps the mounted-on fileid? */ if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) && - nfsi->fileid =3D=3D fattr->mounted_on_fileid) + inode->i_ino =3D=3D fattr->mounted_on_fileid) return 0; printk(KERN_ERR "NFS: server %s error: fileid changed\n" "fsid %s: expected fileid 0x%Lx, got 0x%Lx\n", NFS_SERVER(inode)->nfs_client->cl_hostname, - inode->i_sb->s_id, (long long)nfsi->fileid, + inode->i_sb->s_id, (long long)inode->i_ino, (long long)fattr->fileid); goto out_err; } diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 4623262da3c0..8e48053b3069 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -396,12 +396,12 @@ static inline int NFS_STALE(const struct inode *inode) =20 static inline __u64 NFS_FILEID(const struct inode *inode) { - return NFS_I(inode)->fileid; + return inode->i_ino; } =20 static inline void set_nfs_fileid(struct inode *inode, __u64 fileid) { - NFS_I(inode)->fileid =3D fileid; + inode->i_ino =3D fileid; } =20 static inline void nfs_mark_for_revalidate(struct inode *inode) --=20 2.54.0 From nobody Fri Jun 12 21:11:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44C3E3C98A4; Tue, 12 May 2026 16:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602379; cv=none; b=Fq2ZDswYHjkcLiwrPLk+ExdPl2W6ueixyNhkQFg46UWeMnkho7R+ruTG8IZBc8REiKFXxBmnH5mrjnKEuoLdYsWs0KV97BubJnx7vOG7pF7fHypPgJlDiCmOvDcei0Err6PqmowyoPU/thOdXom+jlI5L1UdGirrg0pRs8ZVq40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602379; c=relaxed/simple; bh=rx1LcxvNKyp7HnoQpHH4ldwjpFp4oFQIx7TuemoUvTM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gqTOBrq7cX/D31M897tyI5tFLu1GLg3Mhasl9MTBgmemyNzpnPh/WHLBsLgEqQ9HYomkIA2dStG6el8dk0iO0iA4hhr3/xruShjyT3nk2p1staG3eeQ8lgljwJD66M5L33nvcNTDCr2eDaUV4UZIfLsWiYEYgH/4h1yv/y7R7gA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eqbqmk+n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eqbqmk+n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12516C2BCFA; Tue, 12 May 2026 16:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778602378; bh=rx1LcxvNKyp7HnoQpHH4ldwjpFp4oFQIx7TuemoUvTM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eqbqmk+n/+ygaMoUxJs0+xLGwkxAIvBMCsxY5vnmEip0EIAaHc2S4z/8fre1cvlXw sBaSqqASh7aZaIHaW6EMloNjXvtp4cAM5HqnZ3IH4Wbh/GcRXsCOVE2YLcwAL6gdr0 V5WvSWkr2OYjvQtYfckUKvVt2dsbIbZ5hEID5tFiKtBOc9LLGudoNRvjCEOBlNCd3V 3BYwYulfTQkH5cEnyw4SLZhXHgdKvRlP3hwEhxE6iTf6FXHUL2UJzi4SMNajfGssFX fdasYhzFj4t+odHUg7j1WyjvnDJyS+e6O23x5dZ7N/hqG+0Q6acuIPJWHhp1XxYDm3 kPCYnEsS93XLQ== From: Jeff Layton Date: Tue, 12 May 2026 12:12:43 -0400 Subject: [PATCH 2/4] nfs: remove nfs_compat_user_ino64() and deprecate enable_ino64 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260512-nfsino-v1-2-284720522f4c@kernel.org> References: <20260512-nfsino-v1-0-284720522f4c@kernel.org> In-Reply-To: <20260512-nfsino-v1-0-284720522f4c@kernel.org> To: Trond Myklebust , Anna Schumaker , Jonathan Corbet , Shuah Khan Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=6708; i=jlayton@kernel.org; h=from:subject:message-id; bh=rx1LcxvNKyp7HnoQpHH4ldwjpFp4oFQIx7TuemoUvTM=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBqA1GHOfW0DyIMM0PsS6TAu/d4itmK/nx1ffAz4 GbWtJ+ZEmOJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCagNRhwAKCRAADmhBGVaC FftSD/4ybbP94oK6QYIn7566Zcv6Fjugu0YT7virUrXynuI0xIxKmiH5TE6PjS38PqC8yT8Y+ex gIZvTI/m4Ip9M2a7nH5LzbqS4dYV+raTkMWX/W/PwGyFjAvO+njaDqcat2gu9XZTGm7f4qsn/Du utvE6zqKZDTtESdVnoOFc2B/BTfKCFQxc7jvXP8uawv16Nux9LZm/iBN0P3+f7UCdJEf8c9dcQe bv2JcsXuwO1BKJ6vSULvVf4MpkisKxYmsJC0YJrwJcJWcDhDtR6Sg99CxCinAqYDc36haXFz0do lfb7eSvL1aUFWQftXUUMi0DPI2hhmmxEmnQCIQyxL0zrpb7STRDfo2Au3l1seCkP8fLuUJykn9d HHtZoOAWBeYppKtu/qp0NJ9ZVanrrvntSO4s3DdbXEreu6mONg13dN5UGZNkB5R6suVESrHQbTN jW540sOyqNF0VOPEqTzrIfv+BJEiyc5jvMmqttEl6D7HEo+LA650sy76nWail1Oeg9ruzZ3J2IP k8IQp4a1W+mmHsBf3MIvqCHHqqhjuvBRzcDQ1XTz1k/RjoK2eUoNlCyBwZ2SCgxuo1/Ht/mnMPg SBWmmCzEZ4KePeaFvDzCF7ZSaNFgStg/fr0KrzWDpRCiqBJ8jd26GFlVkVhuZxO2vLAPMVc2n1D hGhFh8uiG34PH7Q== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Now that inode->i_ino stores the full 64-bit NFS fileid, the nfs_compat_user_ino64() function is no longer needed. generic_fillattr() already copies inode->i_ino into stat->ino, so the explicit override in nfs_getattr() is also redundant. Also remove the now-unused nfs_fileid_to_ino_t() and nfs_fattr_to_ino_t() helper functions that were used to XOR-fold 64-bit fileids into the old unsigned long i_ino. Keep the enable_ino64 module parameter as a deprecated stub that accepts but ignores the value, logging a notice when set. This avoids breaking existing configurations that pass nfs.enable_ino64 on the kernel command line or in modprobe.d. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton --- Documentation/admin-guide/kernel-parameters.txt | 7 ---- fs/nfs/dir.c | 2 +- fs/nfs/inode.c | 50 +++++++--------------= ---- include/linux/nfs_fs.h | 10 ----- 4 files changed, 15 insertions(+), 54 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 4d0f545fb3ec..1e75cfb81d9a 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4308,13 +4308,6 @@ Kernel parameters Only applies if the softerr mount option is enabled, and the specified value is >=3D 0. =20 - nfs.enable_ino64=3D - [NFS] enable 64-bit inode numbers. - If zero, the NFS client will fake up a 32-bit inode - number for the readdir() and stat() syscalls instead - of returning the full 64-bit number. - The default is to return 64-bit inode numbers. - nfs.idmap_cache_timeout=3D [NFS] set the maximum lifetime for idmapper cache entries. diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5f8c3ea0bce3..659e39b1562b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1106,7 +1106,7 @@ static void nfs_do_filldir(struct nfs_readdir_descrip= tor *desc, =20 ent =3D &array->array[i]; if (!dir_emit(desc->ctx, ent->name, ent->name_len, - nfs_compat_user_ino64(ent->ino), ent->d_type)) { + ent->ino, ent->d_type)) { desc->eob =3D true; break; } diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index dd9e378c36fb..a21ed1c7f89d 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -57,21 +57,23 @@ =20 #define NFSDBG_FACILITY NFSDBG_VFS =20 -#define NFS_64_BIT_INODE_NUMBERS_ENABLED 1 +static bool enable_ino64; =20 -/* Default is to see 64-bit inode numbers */ -static bool enable_ino64 =3D NFS_64_BIT_INODE_NUMBERS_ENABLED; +static int param_set_enable_ino64(const char *val, const struct kernel_par= am *kp) +{ + pr_notice("enable_ino64 is deprecated and has no effect\n"); + return 0; +} + +static const struct kernel_param_ops param_ops_enable_ino64 =3D { + .set =3D param_set_enable_ino64, + .get =3D param_get_bool, +}; =20 static int nfs_update_inode(struct inode *, struct nfs_fattr *); =20 static struct kmem_cache * nfs_inode_cachep; =20 -static inline u64 -nfs_fattr_to_ino_t(struct nfs_fattr *fattr) -{ - return fattr->fileid; -} - int nfs_wait_bit_killable(struct wait_bit_key *key, int mode) { if (unlikely(nfs_current_task_exiting())) @@ -83,29 +85,6 @@ int nfs_wait_bit_killable(struct wait_bit_key *key, int = mode) } EXPORT_SYMBOL_GPL(nfs_wait_bit_killable); =20 -/** - * nfs_compat_user_ino64 - returns the user-visible inode number - * @fileid: 64-bit fileid - * - * This function returns a 32-bit inode number if the boot parameter - * nfs.enable_ino64 is zero. - */ -u64 nfs_compat_user_ino64(u64 fileid) -{ -#ifdef CONFIG_COMPAT - compat_ulong_t ino; -#else=09 - unsigned long ino; -#endif - - if (enable_ino64) - return fileid; - ino =3D fileid; - if (sizeof(ino) < sizeof(fileid)) - ino ^=3D fileid >> (sizeof(fileid)-sizeof(ino)) * 8; - return ino; -} - int nfs_drop_inode(struct inode *inode) { return NFS_STALE(inode) || inode_generic_drop(inode); @@ -418,7 +397,7 @@ nfs_ilookup(struct super_block *sb, struct nfs_fattr *f= attr, struct nfs_fh *fh) !(fattr->valid & NFS_ATTR_FATTR_TYPE)) return NULL; =20 - hash =3D nfs_fattr_to_ino_t(fattr); + hash =3D fattr->fileid; inode =3D ilookup5(sb, hash, nfs_find_actor, &desc); =20 dprintk("%s: returning %p\n", __func__, inode); @@ -466,7 +445,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, st= ruct nfs_fattr *fattr) if ((fattr->valid & NFS_ATTR_FATTR_TYPE) =3D=3D 0) goto out_no_inode; =20 - hash =3D nfs_fattr_to_ino_t(fattr); + hash =3D fattr->fileid; =20 inode =3D iget5_locked(sb, hash, nfs_find_actor, nfs_init_locked, &desc); if (inode =3D=3D NULL) { @@ -1061,7 +1040,6 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct= path *path, stat->result_mask =3D nfs_get_valid_attrmask(inode) | request_mask; =20 generic_fillattr(&nop_mnt_idmap, request_mask, inode, stat); - stat->ino =3D nfs_compat_user_ino64(NFS_FILEID(inode)); stat->change_cookie =3D inode_peek_iversion_raw(inode); stat->attributes_mask |=3D STATX_ATTR_CHANGE_MONOTONIC; if (server->change_attr_type !=3D NFS4_CHANGE_TYPE_IS_UNDEFINED) @@ -2793,7 +2771,7 @@ static void __exit exit_nfs_fs(void) MODULE_AUTHOR("Olaf Kirch "); MODULE_DESCRIPTION("NFS client support"); MODULE_LICENSE("GPL"); -module_param(enable_ino64, bool, 0644); +module_param_cb(enable_ino64, ¶m_ops_enable_ino64, &enable_ino64, 0644= ); =20 module_init(init_nfs_fs) module_exit(exit_nfs_fs) diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8e48053b3069..6d6fa62ede10 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -473,7 +473,6 @@ extern void nfs_file_set_open_context(struct file *filp= , struct nfs_open_context extern void nfs_file_clear_open_context(struct file *flip); extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_conte= xt *ctx); extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); -extern u64 nfs_compat_user_ino64(u64 fileid); extern void nfs_fattr_init(struct nfs_fattr *fattr); extern void nfs_fattr_set_barrier(struct nfs_fattr *fattr); extern unsigned long nfs_inc_attr_generation_counter(void); @@ -668,15 +667,6 @@ static inline loff_t nfs_size_to_loff_t(__u64 size) return min_t(u64, size, OFFSET_MAX); } =20 -static inline ino_t -nfs_fileid_to_ino_t(u64 fileid) -{ - ino_t ino =3D (ino_t) fileid; - if (sizeof(ino_t) < sizeof(u64)) - ino ^=3D fileid >> (sizeof(u64)-sizeof(ino_t)) * 8; - return ino; -} - static inline void nfs_ooo_clear(struct nfs_inode *nfsi) { nfsi->cache_validity &=3D ~NFS_INO_DATA_INVAL_DEFER; --=20 2.54.0 From nobody Fri Jun 12 21:11:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 254523CC32E; Tue, 12 May 2026 16:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602380; cv=none; b=qFb2rgFU1W7/CGk1O7jJ/p9Z+X5YoM60fMx8ebBInJZdJ/bZ44BtJXy6nebuUGeTRr/f6o0fs6OWyisQ+eGuhH9m512kTfaN4/yC5dGurDTso8Etp/OR5oRlPhgmK405PDG5BhGHG5tvFVlMgKXiwAo33I2mny/SDzqFOHh/NXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602380; c=relaxed/simple; bh=QjF9bEGw1mWRIYsh12FSZSTNDWn2exN2PWuDq1/xAqA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oti0GDEUwWXYQw1uf0GBKCncHQuTEpGCv9ejRCWr8lM7urkbEq210rVhwBjRpIJxHBXPJIVHd7/5eHi5Xyg0QbCpa3iHnxLMab/Xdc+SIjtEkhdVp7MTdTRfcJSNK18JQa0ZLz0eF6QHY5xvjkQsv5vGZT3YZ7fEr3qBQqf7/wg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IQtpkc6b; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IQtpkc6b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0405DC2BCC7; Tue, 12 May 2026 16:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778602379; bh=QjF9bEGw1mWRIYsh12FSZSTNDWn2exN2PWuDq1/xAqA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IQtpkc6b8Jwlz+eXTq36BQZN/4Tjm4UQcJQz97OWZ98ro74CsoEfoxNKi0ylJyBKQ 1Fa+alPYU5e2tB0du1cEXQpHcawZ7OB97KQU2/zGCek1xjG1rz05HcKX55/anjDqzs n3NMPXgffEmrW0Ki54hOhrPHg5McqBJrh3lc8Ngq9pBay1kW9/CoarngHF5FxIb6GF xwkBnZn00aGZVb+GJKwS/WqAW8+dh7UmlzZ6zQGvB3p3NCxRdq8EbY46t1wqmLFk5A WkFBmOXPF1ia3XFILoD+Guk6ORLo8tgltVXi6MzMVwqMxIRHy7R0TmGYa0gEBXos83 H/6sNeIEa6n2g== From: Jeff Layton Date: Tue, 12 May 2026 12:12:44 -0400 Subject: [PATCH 3/4] nfs: replace NFS_FILEID() and nfsi->fileid with inode->i_ino Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260512-nfsino-v1-3-284720522f4c@kernel.org> References: <20260512-nfsino-v1-0-284720522f4c@kernel.org> In-Reply-To: <20260512-nfsino-v1-0-284720522f4c@kernel.org> To: Trond Myklebust , Anna Schumaker , Jonathan Corbet , Shuah Khan Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=34787; i=jlayton@kernel.org; h=from:subject:message-id; bh=QjF9bEGw1mWRIYsh12FSZSTNDWn2exN2PWuDq1/xAqA=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBqA1GHwaeGgtQc5NebyYyW4LhbcDOMgGDNe2oMr wdZ550vX6iJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCagNRhwAKCRAADmhBGVaC FYasD/9oNEPDaNOta01msYBT1Ag5ADrF+NmZd0NfJ7v28ma1ouwnuSf4ZWrUUYcFD7LYbjbY6l/ AAIrTgWuCeYmwxAMnaNjzrIlSPsQCzElX7ljL7vV0xNALgonSh9p5rJZQl6HbYDM/BfoLjAn9Kr mwqnySOHiNVkZNRajomHUxKT084Acw+0l2AoE0L2iW2Gc5f37djh+MlXuJGWMo4tlJmuhc1QTim 8C3ez8ZD7y3+KLbuyGKCw+/N9nO5saUQ6h1yTrXmkjlyQEb8NTxO8bWLZrTV7hVc/IUHRKNLBQl EwDfpX04Nv5SIjJU7+dOrQkfWI8GZbh9FEaEaYaew9qn9aa0VEAw9wjbC7MnB1SwSEOOIaB6/a8 SPPuLyiKScLqTjRXRgnx2YuLjjGEOrpGTzexbAilT3Dt87W6lMx6SIIp+w/2q26u0qGy/ne74tJ dJ1rw5uxto9ylwZ6iZt04NsR6sO0xHiTUZ9DAQ1Ub6mWQkW4obNLYq+X6+BgcFsZpnC9ZhKXqGV ychb/eriaGjAbF7088wFiXJlS3B1uXEVCFtb/tNtuui4sj0S9dV+Krz0myaJxMB536zr5M7vyuF zIEY9N/AzTlrs/acHpFw7wFea9cPQ8hiTs4ab49JGWZggSMc7LSt/sN2eUkwGXZ13nEk0MrSC8p 8zypxVTTmMiSiEg== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Now that inode->i_ino stores the full 64-bit NFS fileid, replace all uses of NFS_FILEID(), set_nfs_fileid(), and direct nfsi->fileid accesses with inode->i_ino throughout the NFS client. Remove the NFS_FILEID() and set_nfs_fileid() helper functions from include/linux/nfs_fs.h since they are no longer needed. Also fix two pre-existing truncation bugs in nfs4trace.h where fileid trace fields were declared as u32 instead of u64. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton --- fs/nfs/export.c | 6 +-- fs/nfs/filelayout/filelayout.c | 4 +- fs/nfs/flexfilelayout/flexfilelayout.c | 6 +-- fs/nfs/inode.c | 16 +++---- fs/nfs/nfs4proc.c | 4 +- fs/nfs/nfs4trace.h | 79 ++++++++++++++----------------= -- fs/nfs/nfstrace.h | 84 +++++++++++++++++-------------= ---- fs/nfs/pagelist.c | 2 +- fs/nfs/pnfs.c | 2 +- fs/nfs/unlink.c | 2 +- fs/nfs/write.c | 2 +- include/linux/nfs_fs.h | 10 ---- 12 files changed, 99 insertions(+), 118 deletions(-) diff --git a/fs/nfs/export.c b/fs/nfs/export.c index a10dd5f9d078..8fb08bce0623 100644 --- a/fs/nfs/export.c +++ b/fs/nfs/export.c @@ -49,14 +49,14 @@ nfs_encode_fh(struct inode *inode, __u32 *p, int *max_l= en, struct inode *parent) return FILEID_INVALID; } =20 - p[FILEID_HIGH_OFF] =3D NFS_FILEID(inode) >> 32; - p[FILEID_LOW_OFF] =3D NFS_FILEID(inode); + p[FILEID_HIGH_OFF] =3D inode->i_ino >> 32; + p[FILEID_LOW_OFF] =3D inode->i_ino; p[FILE_I_TYPE_OFF] =3D inode->i_mode & S_IFMT; p[len - 1] =3D 0; /* Padding */ nfs_copy_fh(clnt_fh, server_fh); *max_len =3D len; dprintk("%s: result fh fileid %llu mode %u size %d\n", - __func__, NFS_FILEID(inode), inode->i_mode, *max_len); + __func__, inode->i_ino, inode->i_mode, *max_len); return *max_len; } =20 diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index e85380e3b11d..f0f53f5dc871 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -95,7 +95,7 @@ static void filelayout_reset_write(struct nfs_pgio_header= *hdr) "(req %s/%llu, %u bytes @ offset %llu)\n", __func__, hdr->task.tk_pid, hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 @@ -112,7 +112,7 @@ static void filelayout_reset_read(struct nfs_pgio_heade= r *hdr) "(req %s/%llu, %u bytes @ offset %llu)\n", __func__, hdr->task.tk_pid, hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout= /flexfilelayout.c index 8b1559171fe3..6a84d85e0651 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1230,7 +1230,7 @@ static void ff_layout_reset_write(struct nfs_pgio_hea= der *hdr, bool retry_pnfs) "(req %s/%llu, %u bytes @ offset %llu)\n", __func__, hdr->task.tk_pid, hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 @@ -1243,7 +1243,7 @@ static void ff_layout_reset_write(struct nfs_pgio_hea= der *hdr, bool retry_pnfs) "(req %s/%llu, %u bytes @ offset %llu)\n", __func__, hdr->task.tk_pid, hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 @@ -1283,7 +1283,7 @@ static void ff_layout_reset_read(struct nfs_pgio_head= er *hdr) "(req %s/%llu, %u bytes @ offset %llu)\n", __func__, hdr->task.tk_pid, hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index a21ed1c7f89d..0d9451a2ad8e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -303,7 +303,7 @@ nfs_find_actor(struct inode *inode, void *opaque) struct nfs_fh *fh =3D desc->fh; struct nfs_fattr *fattr =3D desc->fattr; =20 - if (NFS_FILEID(inode) !=3D fattr->fileid) + if (inode->i_ino !=3D fattr->fileid) return 0; if (inode_wrong_type(inode, fattr->mode)) return 0; @@ -320,7 +320,7 @@ nfs_init_locked(struct inode *inode, void *opaque) struct nfs_find_desc *desc =3D opaque; struct nfs_fattr *fattr =3D desc->fattr; =20 - set_nfs_fileid(inode, fattr->fileid); + inode->i_ino =3D fattr->fileid; inode->i_mode =3D fattr->mode; nfs_copy_fh(NFS_FH(inode), desc->fh); return 0; @@ -580,7 +580,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, st= ruct nfs_fattr *fattr) } dprintk("NFS: nfs_fhget(%s/%Lu fh_crc=3D0x%08x ct=3D%d)\n", inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(inode), + (unsigned long long)inode->i_ino, nfs_display_fhandle_hash(fh), icount_read(inode)); =20 @@ -1343,7 +1343,7 @@ __nfs_revalidate_inode(struct nfs_server *server, str= uct inode *inode) struct nfs_inode *nfsi =3D NFS_I(inode); =20 dfprintk(PAGECACHE, "NFS: revalidating (%s/%Lu)\n", - inode->i_sb->s_id, (unsigned long long)NFS_FILEID(inode)); + inode->i_sb->s_id, (unsigned long long)inode->i_ino); =20 trace_nfs_revalidate_inode_enter(inode); =20 @@ -1373,7 +1373,7 @@ __nfs_revalidate_inode(struct nfs_server *server, str= uct inode *inode) if (status !=3D 0) { dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Lu) getattr failed, erro= r=3D%d\n", inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(inode), status); + (unsigned long long)inode->i_ino, status); switch (status) { case -ETIMEDOUT: /* A soft timeout occurred. Use cached information? */ @@ -1393,7 +1393,7 @@ __nfs_revalidate_inode(struct nfs_server *server, str= uct inode *inode) if (status) { dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Lu) refresh failed, erro= r=3D%d\n", inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(inode), status); + (unsigned long long)inode->i_ino, status); goto out; } =20 @@ -1404,7 +1404,7 @@ __nfs_revalidate_inode(struct nfs_server *server, str= uct inode *inode) =20 dfprintk(PAGECACHE, "NFS: (%s/%Lu) revalidation complete\n", inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(inode)); + (unsigned long long)inode->i_ino); =20 out: nfs_free_fattr(fattr); @@ -1453,7 +1453,7 @@ static int nfs_invalidate_mapping(struct inode *inode= , struct address_space *map =20 dfprintk(PAGECACHE, "NFS: (%s/%Lu) data cache invalidated\n", inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(inode)); + (unsigned long long)inode->i_ino); return 0; } =20 diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a9b8d482d289..60024b978ee0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -377,7 +377,7 @@ static void nfs4_setup_readdir(u64 cookie, __be32 *veri= fier, struct dentry *dent *p++ =3D htonl(attrs); /* bitmap */ *p++ =3D htonl(12); /* attribute buffer length */ *p++ =3D htonl(NF4DIR); - p =3D xdr_encode_hyper(p, NFS_FILEID(d_inode(dentry))); + p =3D xdr_encode_hyper(p, d_inode(dentry)->i_ino); } =09 *p++ =3D xdr_one; /* next */ @@ -391,7 +391,7 @@ static void nfs4_setup_readdir(u64 cookie, __be32 *veri= fier, struct dentry *dent *p++ =3D htonl(12); /* attribute buffer length */ *p++ =3D htonl(NF4DIR); spin_lock(&dentry->d_lock); - p =3D xdr_encode_hyper(p, NFS_FILEID(d_inode(dentry->d_parent))); + p =3D xdr_encode_hyper(p, d_inode(dentry->d_parent)->i_ino); spin_unlock(&dentry->d_lock); =20 readdir->pgbase =3D (char *)p - (char *)start; diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index c939533b9881..1ed677810d9d 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -597,13 +597,13 @@ DECLARE_EVENT_CLASS(nfs4_open_event, __entry->openstateid_hash =3D 0; } if (inode !=3D NULL) { - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); } else { __entry->fileid =3D 0; __entry->fhandle =3D 0; } - __entry->dir =3D NFS_FILEID(d_inode(ctx->dentry->d_parent)); + __entry->dir =3D d_inode(ctx->dentry->d_parent)->i_ino; __assign_str(name); ), =20 @@ -658,7 +658,7 @@ TRACE_EVENT(nfs4_cached_open, const struct inode *inode =3D state->inode; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->fmode =3D (__force unsigned int)state->state; __entry->stateid_seq =3D @@ -703,7 +703,7 @@ TRACE_EVENT(nfs4_close, const struct inode *inode =3D state->inode; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->fmode =3D (__force unsigned int)state->state; __entry->error =3D error < 0 ? -error : 0; @@ -759,7 +759,7 @@ DECLARE_EVENT_CLASS(nfs4_lock_event, __entry->start =3D request->fl_start; __entry->end =3D request->fl_end; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->stateid_seq =3D be32_to_cpu(state->stateid.seqid); @@ -831,7 +831,7 @@ TRACE_EVENT(nfs4_set_lock, __entry->start =3D request->fl_start; __entry->end =3D request->fl_end; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->stateid_seq =3D be32_to_cpu(state->stateid.seqid); @@ -922,7 +922,7 @@ TRACE_EVENT(nfs4_state_lock_reclaim, const struct inode *inode =3D state->inode; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->state_flags =3D state->flags; __entry->lock_flags =3D lock->ls_flags; @@ -960,7 +960,7 @@ DECLARE_EVENT_CLASS(nfs4_set_delegation_event, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->fmode =3D (__force unsigned int)fmode; ), @@ -1087,7 +1087,7 @@ DECLARE_EVENT_CLASS(nfs4_test_stateid_event, =20 __entry->error =3D error < 0 ? -error : 0; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->stateid_seq =3D be32_to_cpu(state->stateid.seqid); @@ -1137,7 +1137,7 @@ DECLARE_EVENT_CLASS(nfs4_lookup_event, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->error =3D -error; __assign_str(name); ), @@ -1185,7 +1185,7 @@ TRACE_EVENT(nfs4_lookupp, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->ino =3D NFS_FILEID(inode); + __entry->ino =3D inode->i_ino; __entry->error =3D error < 0 ? -error : 0; ), =20 @@ -1220,8 +1220,8 @@ TRACE_EVENT(nfs4_rename, =20 TP_fast_assign( __entry->dev =3D olddir->i_sb->s_dev; - __entry->olddir =3D NFS_FILEID(olddir); - __entry->newdir =3D NFS_FILEID(newdir); + __entry->olddir =3D olddir->i_ino; + __entry->newdir =3D newdir->i_ino; __entry->error =3D error < 0 ? -error : 0; __assign_str(oldname); __assign_str(newname); @@ -1258,7 +1258,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_event, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->error =3D error < 0 ? -error : 0; ), @@ -1311,7 +1311,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_event, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->error =3D error < 0 ? -error : 0; __entry->stateid_seq =3D @@ -1421,7 +1421,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_callback_event, __entry->error =3D error < 0 ? -error : 0; __entry->fhandle =3D nfs_fhandle_hash(fhandle); if (!IS_ERR_OR_NULL(inode)) { - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; } else { __entry->fileid =3D 0; @@ -1478,7 +1478,7 @@ DECLARE_EVENT_CLASS(nfs4_inode_stateid_callback_event, __entry->error =3D error < 0 ? -error : 0; __entry->fhandle =3D nfs_fhandle_hash(fhandle); if (!IS_ERR_OR_NULL(inode)) { - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; } else { __entry->fileid =3D 0; @@ -1655,7 +1655,7 @@ DECLARE_EVENT_CLASS(nfs4_read_event, const struct pnfs_layout_segment *lseg =3D hdr->lseg; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset =3D hdr->args.offset; __entry->arg_count =3D hdr->args.count; @@ -1727,7 +1727,7 @@ DECLARE_EVENT_CLASS(nfs4_write_event, const struct pnfs_layout_segment *lseg =3D hdr->lseg; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset =3D hdr->args.offset; __entry->arg_count =3D hdr->args.count; @@ -1795,7 +1795,7 @@ DECLARE_EVENT_CLASS(nfs4_commit_event, const struct pnfs_layout_segment *lseg =3D data->lseg; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset =3D data->args.offset; __entry->count =3D data->args.count; @@ -1857,7 +1857,7 @@ TRACE_EVENT(nfs4_layoutget, const struct inode *inode =3D d_inode(ctx->dentry); const struct nfs4_state *state =3D ctx->state; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->iomode =3D args->iomode; __entry->offset =3D args->offset; @@ -1957,7 +1957,7 @@ TRACE_EVENT(pnfs_update_layout, ), TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->pos =3D pos; __entry->count =3D count; @@ -2012,7 +2012,7 @@ DECLARE_EVENT_CLASS(pnfs_layout_event, ), TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->pos =3D pos; __entry->count =3D count; @@ -2194,7 +2194,7 @@ DECLARE_EVENT_CLASS(nfs4_flexfiles_io_event, __entry->error =3D -error; __entry->nfs_error =3D hdr->res.op_status; __entry->fhandle =3D nfs_fhandle_hash(hdr->args.fh); - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; __entry->offset =3D hdr->args.offset; __entry->count =3D hdr->args.count; @@ -2258,7 +2258,7 @@ TRACE_EVENT(ff_layout_commit_error, __entry->error =3D -error; __entry->nfs_error =3D data->res.op_status; __entry->fhandle =3D nfs_fhandle_hash(data->args.fh); - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; __entry->offset =3D data->args.offset; __entry->count =3D data->args.count; @@ -2423,7 +2423,7 @@ TRACE_EVENT(nfs4_llseek, TP_STRUCT__entry( __field(unsigned long, error) __field(u32, fhandle) - __field(u32, fileid) + __field(u64, fileid) __field(dev_t, dev) __field(int, stateid_seq) __field(u32, stateid_hash) @@ -2434,10 +2434,9 @@ TRACE_EVENT(nfs4_llseek, ), =20 TP_fast_assign( - const struct nfs_inode *nfsi =3D NFS_I(inode); const struct nfs_fh *fh =3D args->sa_fh; =20 - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset_s =3D args->sa_offset; @@ -2499,7 +2498,7 @@ DECLARE_EVENT_CLASS(nfs4_sparse_event, __entry->offset =3D args->falloc_offset; __entry->len =3D args->falloc_length; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __entry->stateid_seq =3D be32_to_cpu(args->falloc_stateid.seqid); @@ -2568,14 +2567,11 @@ TRACE_EVENT(nfs4_copy, ), =20 TP_fast_assign( - const struct nfs_inode *src_nfsi =3D NFS_I(src_inode); - const struct nfs_inode *dst_nfsi =3D NFS_I(dst_inode); - - __entry->src_fileid =3D src_nfsi->fileid; + __entry->src_fileid =3D src_inode->i_ino; __entry->src_dev =3D src_inode->i_sb->s_dev; __entry->src_fhandle =3D nfs_fhandle_hash(args->src_fh); __entry->src_offset =3D args->src_pos; - __entry->dst_fileid =3D dst_nfsi->fileid; + __entry->dst_fileid =3D dst_inode->i_ino; __entry->dst_dev =3D dst_inode->i_sb->s_dev; __entry->dst_fhandle =3D nfs_fhandle_hash(args->dst_fh); __entry->dst_offset =3D args->dst_pos; @@ -2666,14 +2662,11 @@ TRACE_EVENT(nfs4_clone, ), =20 TP_fast_assign( - const struct nfs_inode *src_nfsi =3D NFS_I(src_inode); - const struct nfs_inode *dst_nfsi =3D NFS_I(dst_inode); - - __entry->src_fileid =3D src_nfsi->fileid; + __entry->src_fileid =3D src_inode->i_ino; __entry->src_dev =3D src_inode->i_sb->s_dev; __entry->src_fhandle =3D nfs_fhandle_hash(args->src_fh); __entry->src_offset =3D args->src_offset; - __entry->dst_fileid =3D dst_nfsi->fileid; + __entry->dst_fileid =3D dst_inode->i_ino; __entry->dst_dev =3D dst_inode->i_sb->s_dev; __entry->dst_fhandle =3D nfs_fhandle_hash(args->dst_fh); __entry->dst_offset =3D args->dst_offset; @@ -2724,7 +2717,7 @@ TRACE_EVENT(nfs4_copy_notify, TP_STRUCT__entry( __field(unsigned long, error) __field(u32, fhandle) - __field(u32, fileid) + __field(u64, fileid) __field(dev_t, dev) __field(int, stateid_seq) __field(u32, stateid_hash) @@ -2733,9 +2726,7 @@ TRACE_EVENT(nfs4_copy_notify, ), =20 TP_fast_assign( - const struct nfs_inode *nfsi =3D NFS_I(inode); - - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->dev =3D inode->i_sb->s_dev; __entry->fhandle =3D nfs_fhandle_hash(args->cna_src_fh); __entry->stateid_seq =3D @@ -2830,7 +2821,7 @@ DECLARE_EVENT_CLASS(nfs4_xattr_event, TP_fast_assign( __entry->error =3D error < 0 ? -error : 0; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(NFS_FH(inode)); __assign_str(name); ), diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h index ff467959f733..4ada21f4eebd 100644 --- a/fs/nfs/nfstrace.h +++ b/fs/nfs/nfstrace.h @@ -80,7 +80,7 @@ DECLARE_EVENT_CLASS(nfs_inode_event, TP_fast_assign( const struct nfs_inode *nfsi =3D NFS_I(inode); __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->cache_validity =3D nfsi->cache_validity; @@ -121,7 +121,7 @@ DECLARE_EVENT_CLASS(nfs_inode_event_done, const struct nfs_inode *nfsi =3D NFS_I(inode); __entry->error =3D error < 0 ? -error : 0; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->type =3D nfs_umode_to_dtype(inode->i_mode); __entry->version =3D inode_peek_iversion_raw(inode); @@ -211,7 +211,7 @@ TRACE_EVENT(nfs_access_exit, const struct nfs_inode *nfsi =3D NFS_I(inode); __entry->error =3D error < 0 ? -error : 0; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->type =3D nfs_umode_to_dtype(inode->i_mode); __entry->version =3D inode_peek_iversion_raw(inode); @@ -265,7 +265,7 @@ DECLARE_EVENT_CLASS(nfs_update_size_class, =20 __entry->dev =3D inode->i_sb->s_dev; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->version =3D inode_peek_iversion_raw(inode); __entry->cur_size =3D i_size_read(inode); __entry->new_size =3D new_size; @@ -317,7 +317,7 @@ DECLARE_EVENT_CLASS(nfs_inode_range_event, =20 __entry->dev =3D inode->i_sb->s_dev; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->version =3D inode_peek_iversion_raw(inode); __entry->range_start =3D range_start; __entry->range_end =3D range_end; @@ -371,7 +371,7 @@ DECLARE_EVENT_CLASS(nfs_readdir_event, const struct nfs_inode *nfsi =3D NFS_I(dir); =20 __entry->dev =3D dir->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D dir->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(dir); if (cookie !=3D 0) @@ -429,9 +429,9 @@ DECLARE_EVENT_CLASS(nfs_lookup_event, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->flags =3D flags; - __entry->fileid =3D d_is_negative(dentry) ? 0 : NFS_FILEID(d_inode(dent= ry)); + __entry->fileid =3D d_is_negative(dentry) ? 0 : d_inode(dentry)->i_ino; __assign_str(name); ), =20 @@ -476,10 +476,10 @@ DECLARE_EVENT_CLASS(nfs_lookup_event_done, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->error =3D error < 0 ? -error : 0; __entry->flags =3D flags; - __entry->fileid =3D d_is_negative(dentry) ? 0 : NFS_FILEID(d_inode(dent= ry)); + __entry->fileid =3D d_is_negative(dentry) ? 0 : d_inode(dentry)->i_ino; __assign_str(name); ), =20 @@ -532,7 +532,7 @@ TRACE_EVENT(nfs_atomic_open_enter, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->flags =3D flags; __entry->fmode =3D (__force unsigned long)ctx->mode; __assign_str(name); @@ -571,7 +571,7 @@ TRACE_EVENT(nfs_atomic_open_exit, TP_fast_assign( __entry->error =3D -error; __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->flags =3D flags; __entry->fmode =3D (__force unsigned long)ctx->mode; __assign_str(name); @@ -608,7 +608,7 @@ TRACE_EVENT(nfs_create_enter, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->flags =3D flags; __assign_str(name); ), @@ -644,7 +644,7 @@ TRACE_EVENT(nfs_create_exit, TP_fast_assign( __entry->error =3D -error; __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->flags =3D flags; __assign_str(name); ), @@ -676,7 +676,7 @@ DECLARE_EVENT_CLASS(nfs_directory_event, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __assign_str(name); ), =20 @@ -714,7 +714,7 @@ DECLARE_EVENT_CLASS(nfs_directory_event_done, =20 TP_fast_assign( __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->error =3D error < 0 ? -error : 0; __assign_str(name); ), @@ -768,8 +768,8 @@ TRACE_EVENT(nfs_link_enter, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); - __entry->dir =3D NFS_FILEID(dir); + __entry->fileid =3D inode->i_ino; + __entry->dir =3D dir->i_ino; __assign_str(name); ), =20 @@ -803,8 +803,8 @@ TRACE_EVENT(nfs_link_exit, =20 TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D NFS_FILEID(inode); - __entry->dir =3D NFS_FILEID(dir); + __entry->fileid =3D inode->i_ino; + __entry->dir =3D dir->i_ino; __entry->error =3D error < 0 ? -error : 0; __assign_str(name); ), @@ -840,8 +840,8 @@ DECLARE_EVENT_CLASS(nfs_rename_event, =20 TP_fast_assign( __entry->dev =3D old_dir->i_sb->s_dev; - __entry->old_dir =3D NFS_FILEID(old_dir); - __entry->new_dir =3D NFS_FILEID(new_dir); + __entry->old_dir =3D old_dir->i_ino; + __entry->new_dir =3D new_dir->i_ino; __assign_str(old_name); __assign_str(new_name); ), @@ -889,8 +889,8 @@ DECLARE_EVENT_CLASS(nfs_rename_event_done, TP_fast_assign( __entry->dev =3D old_dir->i_sb->s_dev; __entry->error =3D -error; - __entry->old_dir =3D NFS_FILEID(old_dir); - __entry->new_dir =3D NFS_FILEID(new_dir); + __entry->old_dir =3D old_dir->i_ino; + __entry->new_dir =3D new_dir->i_ino; __assign_str(old_name); __assign_str(new_name); ), @@ -943,7 +943,7 @@ TRACE_EVENT(nfs_sillyrename_unlink, struct inode *dir =3D d_inode(data->dentry->d_parent); size_t len =3D data->args.name.len; __entry->dev =3D dir->i_sb->s_dev; - __entry->dir =3D NFS_FILEID(dir); + __entry->dir =3D dir->i_ino; __entry->error =3D -error; memcpy(__get_str(name), data->args.name.name, len); @@ -981,7 +981,7 @@ DECLARE_EVENT_CLASS(nfs_folio_event, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->offset =3D offset; @@ -1031,7 +1031,7 @@ DECLARE_EVENT_CLASS(nfs_folio_event_done, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->offset =3D offset; @@ -1109,7 +1109,7 @@ DECLARE_EVENT_CLASS(nfs_kiocb_event, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->offset =3D iocb->ki_pos; @@ -1160,7 +1160,7 @@ TRACE_EVENT(nfs_aop_readahead, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->offset =3D pos; @@ -1199,7 +1199,7 @@ TRACE_EVENT(nfs_aop_readahead_done, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->version =3D inode_peek_iversion_raw(inode); __entry->nr_pages =3D nr_pages; @@ -1239,7 +1239,7 @@ TRACE_EVENT(nfs_initiate_read, __entry->offset =3D hdr->args.offset; __entry->count =3D hdr->args.count; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1284,7 +1284,7 @@ TRACE_EVENT(nfs_readpage_done, __entry->res_count =3D hdr->res.count; __entry->eof =3D hdr->res.eof; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1330,7 +1330,7 @@ TRACE_EVENT(nfs_readpage_short, __entry->res_count =3D hdr->res.count; __entry->eof =3D hdr->res.eof; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1377,7 +1377,7 @@ TRACE_EVENT(nfs_pgio_error, __entry->arg_count =3D hdr->args.count; __entry->res_count =3D hdr->res.count; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1416,7 +1416,7 @@ TRACE_EVENT(nfs_initiate_write, __entry->count =3D hdr->args.count; __entry->stable =3D hdr->args.stable; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1467,7 +1467,7 @@ TRACE_EVENT(nfs_writeback_done, &verf->verifier, NFS4_VERIFIER_SIZE); __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1507,7 +1507,7 @@ DECLARE_EVENT_CLASS(nfs_page_class, const struct nfs_inode *nfsi =3D NFS_I(inode); =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->req =3D req; __entry->offset =3D req_offset(req); @@ -1555,7 +1555,7 @@ DECLARE_EVENT_CLASS(nfs_page_error_class, TP_fast_assign( const struct nfs_inode *nfsi =3D NFS_I(inode); __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(&nfsi->fh); __entry->offset =3D req_offset(req); __entry->count =3D req->wb_bytes; @@ -1609,7 +1609,7 @@ TRACE_EVENT(nfs_initiate_commit, __entry->offset =3D data->args.offset; __entry->count =3D data->args.count; __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1655,7 +1655,7 @@ TRACE_EVENT(nfs_commit_done, &verf->verifier, NFS4_VERIFIER_SIZE); __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); ), =20 @@ -1701,7 +1701,7 @@ DECLARE_EVENT_CLASS(nfs_direct_req_class, const struct nfs_fh *fh =3D &nfsi->fh; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset =3D dreq->io_start; __entry->count =3D dreq->count; @@ -1765,7 +1765,7 @@ DECLARE_EVENT_CLASS(nfs_local_dio_class, const struct nfs_fh *fh =3D &nfsi->fh; =20 __entry->dev =3D inode->i_sb->s_dev; - __entry->fileid =3D nfsi->fileid; + __entry->fileid =3D inode->i_ino; __entry->fhandle =3D nfs_fhandle_hash(fh); __entry->offset =3D offset; __entry->count =3D count; diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 4a87b2fdb2e6..7dd478ffc2fa 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -759,7 +759,7 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs= _pgio_header *hdr, dprintk("NFS: initiated pgio call " "(req %s/%llu, %u bytes @ offset %llu)\n", hdr->inode->i_sb->s_id, - (unsigned long long)NFS_FILEID(hdr->inode), + (unsigned long long)hdr->inode->i_ino, hdr->args.count, (unsigned long long)hdr->args.offset); =20 diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 743467e9ba20..fdedeff5f6cc 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2373,7 +2373,7 @@ pnfs_update_layout(struct inode *ino, dprintk("%s: inode %s/%llu pNFS layout segment %s for " "(%s, offset: %llu, length: %llu)\n", __func__, ino->i_sb->s_id, - (unsigned long long)NFS_FILEID(ino), + (unsigned long long)ino->i_ino, IS_ERR_OR_NULL(lseg) ? "not found" : "found", iomode=3D=3DIOMODE_RW ? "read/write" : "read-only", (unsigned long long)pos, diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index df3ca4669df6..7f2e84eaaa9f 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -461,7 +461,7 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentr= y) if (dentry->d_flags & DCACHE_NFSFS_RENAMED) goto out; =20 - fileid =3D NFS_FILEID(d_inode(dentry)); + fileid =3D d_inode(dentry)->i_ino; =20 sdentry =3D NULL; do { diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 3134bb17f3e3..9035bb8a0216 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1817,7 +1817,7 @@ static void nfs_commit_release_pages(struct nfs_commi= t_data *data) =20 dprintk("NFS: commit (%s/%llu %d@%lld)", nfs_req_openctx(req)->dentry->d_sb->s_id, - (unsigned long long)NFS_FILEID(d_inode(nfs_req_openctx(req)->dentry)), + (unsigned long long)d_inode(nfs_req_openctx(req)->dentry)->i_ino, req->wb_bytes, (long long)req_offset(req)); if (status < 0) { diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 6d6fa62ede10..83063f4ab488 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -394,16 +394,6 @@ static inline int NFS_STALE(const struct inode *inode) return test_bit(NFS_INO_STALE, &NFS_I(inode)->flags); } =20 -static inline __u64 NFS_FILEID(const struct inode *inode) -{ - return inode->i_ino; -} - -static inline void set_nfs_fileid(struct inode *inode, __u64 fileid) -{ - inode->i_ino =3D fileid; -} - static inline void nfs_mark_for_revalidate(struct inode *inode) { struct nfs_inode *nfsi =3D NFS_I(inode); --=20 2.54.0 From nobody Fri Jun 12 21:11:01 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 309603CC7C7; Tue, 12 May 2026 16:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602381; cv=none; b=XG5nLbmfKT0ldv9PTdyUxKTgWZ5Tc6egXDdIsI+uctsiseUnDs10AAz+Q24oWnSpDcf0doDIjtV8LJzO3odEFSBgMLoea/FmYpuUqtVHYAujZdD1knHrH3g0qtosBQxngwwSkva/mFGWZdNSP/Yg+VKxfDpCQLDDUAc6AwQ7lW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778602381; c=relaxed/simple; bh=xSfXSQQnkiNhcDIRyu5/XLP0M8+rWWwcVgu+MrwgSHg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ABec0Ehm3liaOWeK5UEyjbHUCbg7x4ZeFaLT23/hGpUWNi99g4Kl6EIBhAvIIyf1Vs4k4sq9MsBQebBMRcF5GLdMjH8cvAuqd9kUxrMVAHDpohpXYU9Bhh/3b6Hnm8Y5N8TPhxfCWamMgXa4cGeOjj9QbbPQKFq2/4FHSbcLEpQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X66kTsE2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X66kTsE2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A778C2BCF5; Tue, 12 May 2026 16:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778602380; bh=xSfXSQQnkiNhcDIRyu5/XLP0M8+rWWwcVgu+MrwgSHg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=X66kTsE21ZyaazSKmMdKvGmhGftOCFnMVHk3UNkOPjpzq7azAct0rNAwCDA7AuNAp Ln8W5ozXBQITetIyz5O3yKpr8jGjHYhxpag//DkeWzpPNtvAU+mtPY1t41MRggg35o /zvo3nrGKoO/T27+l43uba9w5AoS/q+bqDK3SJHvdsVUknPzF/KHQJS2p6D8neZiJK s8oaDM1pV1QLCcbb6HTGNAYzrhUGohqfADxdRzWjAB2vC9ulOwvfuEPkaCBi7GwZLf gLNLG09H4hWVr5UYc32oOMMPf1z8pK33ilXfCLJafIZwtTaF+cyomCcKIAocJCIxeD maU2fFlY1ff8w== From: Jeff Layton Date: Tue, 12 May 2026 12:12:45 -0400 Subject: [PATCH 4/4] nfs: remove fileid field from struct nfs_inode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260512-nfsino-v1-4-284720522f4c@kernel.org> References: <20260512-nfsino-v1-0-284720522f4c@kernel.org> In-Reply-To: <20260512-nfsino-v1-0-284720522f4c@kernel.org> To: Trond Myklebust , Anna Schumaker , Jonathan Corbet , Shuah Khan Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=747; i=jlayton@kernel.org; h=from:subject:message-id; bh=xSfXSQQnkiNhcDIRyu5/XLP0M8+rWWwcVgu+MrwgSHg=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBqA1GHPYL2kyq4LV26QR5FSt+tmqeOTumYNHzeN 5PUHakZhUqJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCagNRhwAKCRAADmhBGVaC Fb2JD/98vIIHh1T8PUneuGjTWldC/YKp74KRsMMx1/LrxLN4IPTHT2P1GPiDh5LdrVUoY60qwUL 9EeDUvZlT1PmCQs16GZnqQ8l9bF9zlsbplJLW9rjekaqlSevwyhR4eg849NeYRcXTgqCXT/j+E+ m8ADXROibMbxwXLeE0Uf3htu7aSRREJbx7y36XOGKMLkXZo7ZLn+fZtUhSQmCjXgvzGh+3Eg17v /lBVDfA4pQCwg4VlBVFeIyoCeRaCKRC6pek1MY9AzmdjTUf2fJPQmplWreA8w1MW1Tdf0m9jRSx GkGyRw0xjRfetiO81LX6tkpjRfU8JuitDLCiu6yuVAl3VRWymRibvgJdUYThlbqLVrr61JzePB0 MWzwXa7ccpJLYyBsxniOmLW1Afi6P/d9B3Po30yxbMx49PaXN84/eqHX/kvNGV1Y3DC2qKLRqYn ew5H6XL29GvyQLQRIE03XoxbS0tvB0YMAnE3BHHybQYKPnpMgq9cEkTohu+/KctgewEEMDJ9fOH HlvQ99nXhO+QHu/VnJfT1Wd6HBqqaCED42KBmUDwi/lQENa2E/gB9SObaZ+yQhCg2PEndAf3O0x YthhlH9PBMQtUZXEMsr7as7hOJ81/YyhHysol/JNjLPrZ68wjNJLp9cMec+09RJvXReAaQWIN7Y 8Hm+IjsGOcNfdRg== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 Now that all NFS client code uses inode->i_ino directly to store and access the 64-bit NFS fileid, the separate fileid field in struct nfs_inode is unused. Remove it to save 8 bytes per NFS inode. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton --- include/linux/nfs_fs.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 83063f4ab488..ec17e602c979 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -145,11 +145,6 @@ struct nfs4_xattr_cache; * nfs fs inode data in memory */ struct nfs_inode { - /* - * The 64bit 'inode number' - */ - __u64 fileid; - /* * NFS file handle */ --=20 2.54.0