[Deepin-Kernel-SIG] [linux 6.6.y] [Upstream] Sync xfs code clean from v6.17-rc1#1711
[Deepin-Kernel-SIG] [linux 6.6.y] [Upstream] Sync xfs code clean from v6.17-rc1#1711opsiff wants to merge 13 commits into
Conversation
mainline inclusion from mainline-v6.17-rc1 category: bugfix When the function xfs_attri_remove_iter was removed, it did not remove the trace event that it called. As a trace event can take up to 5K of memory for text and meta data regardless of if it is used or not, remove this unused trace event. Fixes: 59782a2 ("xfs: remove xfs_attri_remove_iter") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 091e945) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix The trace event xlog_iclog_want_sync was added but never used. As trace events can take up around 5K of memory in text and meta data regardless if they are used or not, remove this unused event. Fixes: 956f6da ("xfs: add iclog state trace events") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 32177ab) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix The trace event xfs_ioctl_clone was added but never used. As trace events can take up to 5K of memory in text and meta data regardless if they are used or not, remove the unused trace event. Fixes: 53aa1c3 ("xfs: define tracepoints for reflink activities") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 6f7080b) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix When the clone/dedupe_file_rang common functions were refactored, it removed the calls to the xfs_reflink_compare_extents and xfs_reflink_compare_extents_error events. As each event can take up to 5K in memory for text and meta data regardless if they are used or not, they should not be created if they are not used. Remove these unused events. Fixes: 876bec6 ("vfs: refactor clone/dedupe_file_range common functions") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 8c54845) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix When the function xfs_attr_rmtval_set() was removed, the call to the corresponding trace event was also removed but the trace event itself was not. As trace events can take up to 5K of memory in text and meta data regardless if they are used or not they should not be created when not used. Remove the unused trace event. Fixes: 0e6acf2 ("xfs: Remove xfs_attr_rmtval_set") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit b3b5015) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix Trace events can take up to 5K in memory for text and meta data per event regardless if they are used or not, so they should not be defined when not used. The events xfs_attr_fillstate and xfs_attr_refillstate are only called in code that is #ifdef out and exists only for future reference. Remove these unused events. If the code is needed again, then git history can recover what the events were. Suggested-by: Christoph Hellwig <hch@lst.de> Fixes: 59782a2 ("xfs: remove xfs_attri_remove_iter") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit b54480c) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix When xfs_attri_remove_iter() was removed, so was the call to the trace event xfs_attr_node_removename. As trace events can take up to 5K in memory for text and meta data regardless if they are used or not, they should not be created when unused. Remove the unused event. Fixes: 59782a2 ("xfs: remove xfs_attri_remove_iter") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit ea26bbc) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix Trace events take up to 5K of memory in text and meta data regardless if they are used or not. The call to the event xfs_alloc_near_error was removed when the cursor data structure allocation was introduced. Remove it as it is no longer used and is just wasting memory. Fixes: f5e7dbe ("xfs: introduce allocation cursor data structure") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 237f8e8) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix When the function xfs_alloc_space_available() was restructured, it removed the only calls to the trace event xfs_alloc_near_nominleft. As trace events take up to 5K of memory for text and meta data for each event, they should not be created when not used. Remove this unused event. Fixes: 54fee13 ("xfs: adjust allocation length in xfs_alloc_space_available") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit f110060) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline incluion from mainline-v6.17-rc1 category: bugfix When the function xfs_flushinval_pages() was removed, it removed the only caller to the trace event xfs_pagecache_inval. As trace events can take up to 5K of memory in text and meta data each regardless if they are used or not, they should not be created when unused. Remove the unused event. Fixes: fb59581 ("xfs: remove xfs_flushinval_pages") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 88fd451) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 category: bugfix When the use of iomap_dio_rw was added, the calls to the trace events xfs_end_io_direct_unwritten and xfs_end_io_direct_append were removed but those trace events were not. As trace events can take up to 5K in memory for text and meta data regardless if they are used or not, they should not be created when not used. Remove the unused events. Fixes: acdda3a ("xfs: use iomap_dio_rw") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 9a8a536) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…nfigure mainline inclusion from mainline-v6.17-rc1 category: bugfix The trace event xfs_file_compat_ioctl is only used when CONFIG_COMPAT is configured in the build. As trace events can take up to 5K in memory for text and meta data regardless if they are used, they should not be created when unused. Add #ifdef CONFIG_COMPAT around the event so that it is only created when that is configured. Fixes: cca28fb ("xfs: split xfs_itrace_entry") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 31b98ef) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.17-rc1 categroy: bugfix The call to the event xfs_reflink_cow_enospc was removed when the COW handling was merged into xfs_file_iomap_begin_delay, but the trace event itself was not. Remove it. Fixes: db46e60 ("xfs: merge COW handling into xfs_file_iomap_begin_delay") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org> (cherry picked from commit 75fe259) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR syncs XFS tracepoint definitions in xfs_trace.h with upstream by dropping unused or removed trace events and guarding a compat-only inode trace event with CONFIG_COMPAT, keeping the trace set aligned with current kernel behavior. Flow diagram for CONFIG_COMPAT-guarded xfs_file_compat_ioctl trace eventflowchart LR
A[xfs_trace_h] --> B[Check CONFIG_COMPAT]
B -->|enabled| C[DEFINE_INODE_EVENT xfs_file_compat_ioctl]
B -->|disabled| D[No xfs_file_compat_ioctl tracepoint]
C --> E[Kernel build includes compat ioctl tracing]
D --> F[Kernel build omits compat ioctl tracing]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- After removing these trace events, double-check that there are no remaining references (e.g., tracepoints names in debug helpers, scripts, or tracepoint class reuse) that would now cause build or runtime issues.
- For the new CONFIG_COMPAT guard around xfs_file_compat_ioctl, verify that the declaration and any call sites are consistently guarded in the same way to avoid mismatched symbol availability in different build configurations.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- After removing these trace events, double-check that there are no remaining references (e.g., tracepoints names in debug helpers, scripts, or tracepoint class reuse) that would now cause build or runtime issues.
- For the new CONFIG_COMPAT guard around xfs_file_compat_ioctl, verify that the declaration and any call sites are consistently guarded in the same way to avoid mismatched symbol availability in different build configurations.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Avenger-285714 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR streamlines XFS tracepoint declarations to align with upstream cleanup for Linux 6.17-rc1.
Changes:
- Guards
xfs_file_compat_ioctltracepoint declaration behindCONFIG_COMPAT. - Removes unused or obsolete XFS trace event declarations across IO, allocation, attr, reflink, and log paths.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by Sourcery
Clean up and streamline XFS tracepoints to match upstream, including config-guarding compat ioctl traces and dropping unused or obsolete events.
Enhancements: