public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: vfs: change inode->i_ino from unsigned long to u64
Date: Wed, 04 Mar 2026 08:15:01 +1000	[thread overview]
Message-ID: <review-overall-20260302-iino-u64-v2-0-e5388800dae0@kernel.org> (raw)
In-Reply-To: <20260302-iino-u64-v2-0-e5388800dae0@kernel.org>

Overall Series Review

Subject: vfs: change inode->i_ino from unsigned long to u64
Author: Jeff Layton <jlayton@kernel.org>
Patches: 166
Reviewed: 2026-03-04T08:15:01.964295

---

This is a well-structured 110-patch series by Jeff Layton that widens `struct inode`'s `i_ino` field from `unsigned long` to `u64`. The motivation is sound: on 32-bit architectures, `unsigned long` is only 32 bits, forcing filesystems like NFS, CIFS, XFS, Ceph, and FUSE to hash or fold their native 64-bit inode numbers, losing information and creating collision risks.

**Strategy**: The series uses a clean three-phase approach for bisectability:
1. Patches 1-59: Introduce `kino_t` typedef (initially `unsigned long`) and `PRIino` format macro (initially `"l"`), convert all format strings and trace events to use them.
2. Patch 60: Flip `kino_t` from `unsigned long` to `u64` and `PRIino` from `"l"` to `"ll"` -- the actual type widening.
3. Patches 61-110: Replace `PRIino` with concrete `%llu`/`%llx` and `kino_t` with `u64`, then remove the typedef/macro.

This is a good strategy that ensures every intermediate commit compiles warning-free on both 32-bit and 64-bit. The series touches 220 files but the vast majority of changes are mechanical format string updates.

**Key concerns**:

1. **`hash()` function truncation on 32-bit**: In patch 002, the `hash()` function in `fs/inode.c` accepts `u64 hashval` but the function body operates entirely on `unsigned long` intermediates and returns `unsigned long`. On 32-bit, the upper 32 bits of a 64-bit inode number are silently truncated in the hash computation. This is not a regression (the hash table is sized for the machine's address space), but it means two inodes differing only in the upper 32 bits will hash to the same bucket on 32-bit. Since the lookup functions compare the full `u64 ino`, this is safe for correctness, just suboptimal for hash distribution. Worth a comment.

2. **ext4 arithmetic casts**: Patch 007 introduces `(unsigned int)` casts for `i_ino % ngroups` and `i_ino % s_mb_nr_global_goals`. Since ext4 inode numbers are always 32-bit (the on-disk format is `__le32`), this truncation is correct in practice, but the cast to `unsigned int` rather than `u32` is slightly inconsistent with kernel conventions. Also, the `div_u64()` usage in `fs/ext4/migrate.c` is correct and necessary since `EXT4_INODES_PER_GROUP` is `unsigned long` (32-bit on 32-bit arches), and 64-bit division by a 32-bit value needs `div_u64()` on 32-bit.

3. **UAPI/procfs format change**: Patch 004 changes `/proc/net/tcp`, `/proc/net/udp`, etc. from `%lu` to `%llu` for the inode number column. While the actual values won't change on 64-bit (same width), on 32-bit the field width could theoretically expand. Userspace parsers that use positional field extraction should be fine since the format is space-delimited, but this is a visible change worth noting in the commit message. The commit message does mention the UAPI diag struct truncation, which is good.

4. **`struct sock` packing on 32-bit**: Patch 004 widens `sk_ino` from `unsigned long` to `u64` in `struct sock`. The cover letter mentions struct inode growing by 4 bytes on 32-bit, but doesn't mention the `struct sock` growth. This is a hot networking structure and the packing impact on 32-bit should be considered.

5. **LLM attribution**: The cover letter notes "Much of this set was generated by LLM" which is honest and appropriate, and the mechanical nature of the bulk conversions makes this a reasonable use case.

Overall, the series is in good shape. The approach is sound, the changes are largely mechanical and correct, and the few non-trivial changes (VFS API widening, ext4 arithmetic, audit, networking) are handled appropriately.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-03 22:15 UTC|newest]

Thread overview: 178+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 20:23 [PATCH v2 000/110] vfs: change inode->i_ino from unsigned long to u64 Jeff Layton
2026-03-02 20:23 ` [PATCH v2 001/110] vfs: introduce kino_t typedef and PRIino format macro Jeff Layton
2026-03-03  1:25   ` Theodore Tso
2026-03-03  4:25     ` Darrick J. Wong
2026-03-03 10:53       ` Jeff Layton
     [not found]         ` <aabkBadGzo7IZpSU@infradead.org>
2026-03-03 13:43           ` Jeff Layton
     [not found]             ` <aabpPQxCTweoTp8Z@infradead.org>
2026-03-03 14:19               ` Jeff Layton
     [not found]                 ` <aabwflLfe2HcGv7X@infradead.org>
2026-03-03 15:14                   ` Jeff Layton
2026-03-03 15:16         ` Theodore Tso
2026-03-03 15:25           ` Jeff Layton
2026-03-03 10:52     ` Jeff Layton
2026-03-03 11:00   ` Jan Kara
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 002/110] vfs: widen inode hash/lookup functions to u64 Jeff Layton
2026-03-03 10:59   ` Jan Kara
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 003/110] audit: widen ino fields " Jeff Layton
2026-03-02 23:44   ` Paul Moore
2026-03-03 11:04     ` Jeff Layton
2026-03-03 16:03       ` Paul Moore
2026-03-03 16:12         ` Jeff Layton
2026-03-03 16:17           ` Paul Moore
2026-03-03 22:15     ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 004/110] net: change sock.sk_ino and sock_i_ino() " Jeff Layton
2026-03-03 10:03   ` Marc Kleine-Budde
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 005/110] trace: store i_ino as u64 instead of ino_t/unsigned long Jeff Layton
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 006/110] trace: reorder TP_STRUCT__entry fields for better packing on 32-bit Jeff Layton
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 007/110] ext4: use PRIino format for i_ino Jeff Layton
2026-03-03 11:20   ` Jan Kara
2026-03-03 11:41     ` Jeff Layton
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:23 ` [PATCH v2 008/110] jbd2: " Jeff Layton
2026-03-03 11:21   ` Jan Kara
2026-03-02 20:23 ` [PATCH v2 009/110] f2fs: " Jeff Layton
2026-03-02 20:23 ` [PATCH v2 010/110] lockd: " Jeff Layton
2026-03-02 20:23 ` [PATCH v2 011/110] nfs: " Jeff Layton
2026-03-02 20:23 ` [PATCH v2 012/110] nfsd: " Jeff Layton
2026-03-02 20:23 ` [PATCH v2 013/110] locks: " Jeff Layton
2026-03-02 20:23 ` [PATCH v2 014/110] proc: " Jeff Layton
2026-03-03 11:22   ` Jan Kara
2026-03-02 20:23 ` [PATCH v2 015/110] nilfs2: " Jeff Layton
2026-03-02 22:34   ` Viacheslav Dubeyko
2026-03-02 20:24 ` [PATCH v2 016/110] 9p: " Jeff Layton
2026-03-03 11:52   ` Christian Schoenebeck
2026-03-02 20:24 ` [PATCH v2 017/110] affs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 018/110] afs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 019/110] autofs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 020/110] befs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 021/110] bfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 022/110] cachefiles: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 023/110] ceph: " Jeff Layton
2026-03-02 22:24   ` Viacheslav Dubeyko
2026-03-02 20:24 ` [PATCH v2 024/110] coda: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 025/110] cramfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 026/110] ecryptfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 027/110] efs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 028/110] exportfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 029/110] ext2: " Jeff Layton
2026-03-03 11:24   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 030/110] freevxfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 031/110] hfs: " Jeff Layton
2026-03-02 22:26   ` Viacheslav Dubeyko
2026-03-02 20:24 ` [PATCH v2 032/110] hfsplus: " Jeff Layton
2026-03-02 22:36   ` Viacheslav Dubeyko
2026-03-02 20:24 ` [PATCH v2 033/110] hpfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 034/110] isofs: " Jeff Layton
2026-03-03 11:24   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 035/110] jffs2: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 036/110] jfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 037/110] minix: " Jeff Layton
2026-03-03 11:25   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 038/110] nsfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 039/110] ntfs3: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 040/110] ocfs2: " Jeff Layton
2026-03-03 11:26   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 041/110] orangefs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 042/110] overlayfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 043/110] qnx4: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 044/110] qnx6: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 045/110] ubifs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 046/110] udf: " Jeff Layton
2026-03-03 11:27   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 047/110] ufs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 048/110] zonefs: " Jeff Layton
2026-03-02 22:57   ` Damien Le Moal
2026-03-02 20:24 ` [PATCH v2 049/110] security: " Jeff Layton
2026-03-03  2:28   ` Paul Moore
2026-03-02 20:24 ` [PATCH v2 050/110] drm/amdgpu: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 051/110] fsnotify: " Jeff Layton
2026-03-03 11:27   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 052/110] net: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 053/110] uprobes: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 054/110] dma-buf: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 055/110] fscrypt: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 056/110] fsverity: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 057/110] iomap: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 058/110] net: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 059/110] vfs: " Jeff Layton
2026-03-03 11:28   ` Jan Kara
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:24 ` [PATCH v2 060/110] vfs: change kino_t from unsigned long to u64 Jeff Layton
2026-03-03 11:29   ` Jan Kara
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-02 20:24 ` [PATCH v2 061/110] ext4: replace PRIino with %llu/%llx format strings Jeff Layton
2026-03-03 11:31   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 062/110] jbd2: " Jeff Layton
2026-03-03 11:32   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 063/110] f2fs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 064/110] lockd: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 065/110] nfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 066/110] nfsd: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 067/110] proc: " Jeff Layton
2026-03-03 11:32   ` Jan Kara
2026-03-02 20:24 ` [PATCH v2 068/110] nilfs2: " Jeff Layton
2026-03-02 22:38   ` Viacheslav Dubeyko
2026-03-02 20:24 ` [PATCH v2 069/110] 9p: " Jeff Layton
2026-03-03 12:12   ` Christian Schoenebeck
2026-03-02 20:24 ` [PATCH v2 070/110] affs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 071/110] afs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 072/110] autofs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 073/110] befs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 074/110] bfs: " Jeff Layton
2026-03-02 20:24 ` [PATCH v2 075/110] cachefiles: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 076/110] ceph: " Jeff Layton
2026-03-02 22:39   ` Viacheslav Dubeyko
2026-03-02 20:25 ` [PATCH v2 077/110] coda: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 078/110] cramfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 079/110] ecryptfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 080/110] efs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 081/110] exportfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 082/110] ext2: " Jeff Layton
2026-03-03 11:33   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 083/110] freevxfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 084/110] hfs: " Jeff Layton
2026-03-02 22:40   ` Viacheslav Dubeyko
2026-03-02 20:25 ` [PATCH v2 085/110] hfsplus: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 086/110] hpfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 087/110] isofs: " Jeff Layton
2026-03-03 11:33   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 088/110] jffs2: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 089/110] jfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 090/110] minix: " Jeff Layton
2026-03-03 11:35   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 091/110] ntfs3: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 092/110] ocfs2: " Jeff Layton
2026-03-03 11:34   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 093/110] orangefs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 094/110] overlayfs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 095/110] qnx4: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 096/110] qnx6: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 097/110] ubifs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 098/110] udf: " Jeff Layton
2026-03-03 11:36   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 099/110] ufs: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 100/110] zonefs: " Jeff Layton
2026-03-02 22:58   ` Damien Le Moal
2026-03-02 20:25 ` [PATCH v2 101/110] fscrypt: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 102/110] fsverity: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 103/110] iomap: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 104/110] fsnotify: " Jeff Layton
2026-03-03 11:36   ` Jan Kara
2026-03-02 20:25 ` [PATCH v2 105/110] security: " Jeff Layton
2026-03-03  2:30   ` Paul Moore
2026-03-02 20:25 ` [PATCH v2 106/110] drm/amdgpu: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 107/110] dma-buf: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 108/110] net: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 109/110] uprobes: " Jeff Layton
2026-03-02 20:25 ` [PATCH v2 110/110] vfs: remove kino_t typedef and PRIino format macro Jeff Layton
2026-03-03 11:37   ` Jan Kara
2026-03-03 22:15   ` Claude review: " Claude Code Review Bot
2026-03-03 10:48 ` [PATCH v2 000/110] vfs: change inode->i_ino from unsigned long to u64 David Howells
2026-03-03 10:55 ` David Howells
2026-03-03 10:58   ` Jeff Layton
2026-03-03 22:15 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-26 15:55 [PATCH 00/61] " Jeff Layton
2026-02-27  1:50 ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-overall-20260302-iino-u64-v2-0-e5388800dae0@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox