Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] Tracepoint truncates the 64-bit inode number to 32 bits on 32-bit 
architectures.
--

--- Patch [7]: [PATCH v4 7/7] ntfs3: add file I/O tracepoints ---
commit 49c2384143cc4908780b467e9d3b31597d86cf97
Author: Baolin Liu <[email protected]>

ntfs3: add file I/O tracepoints

This commit adds trace events for ntfs_file_read_iter() and
ntfs_file_write_iter() to help observe file read and write activity.

> diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
> index e0c0c44ce318f..7503000689840 100644
> --- a/include/trace/events/ntfs3.h
> +++ b/include/trace/events/ntfs3.h
[ ... ]
> +DECLARE_EVENT_CLASS(ntfs3_file_class,
> +     TP_PROTO(struct kiocb *iocb, struct iov_iter *iter),
> +     TP_ARGS(iocb, iter),
> +     TP_STRUCT__entry(
> +             __field(loff_t, size)
> +             __field(loff_t, offset)
> +             __field(size_t, count)
> +             __field(unsigned long, ino)

[Severity: Medium]
Does this truncate the 64-bit inode number to 32 bits on 32-bit architectures?

NTFS uses 48-bit MFT references that frequently exceed 32 bits, and
`inode->i_ino` is defined as a 64-bit `u64` in the VFS. Using `unsigned long`
here will silently truncate high inode numbers on 32-bit systems.

If this field is updated to `u64`, the `TP_printk` format string would also
need to be updated to use `%llu` instead of `%lu`.

> +             __field(dev_t, dev)
> +     ),

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=7

Reply via email to