summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trace.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2023-02-13 09:14:56 +1100
committerDave Chinner <dchinner@redhat.com>2023-02-13 09:14:56 +1100
commitbd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e (patch)
tree0e222d843e98ce03b4c70fa14f744ae3a44a2507 /fs/xfs/xfs_trace.h
parentf8f1ed1ab3babad46b25e2dbe8de43b33fe7aaa6 (diff)
downloadlinux-stable-bd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e.tar.gz
linux-stable-bd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e.tar.bz2
linux-stable-bd4f5d09cc93c8ca51e4efea86ac90a4bb553d6e.zip
xfs: refactor the filestreams allocator pick functions
Now that the filestreams allocator is largely rewritten, restructure the main entry point and pick function to seperate out the different operations cleanly. The MRU lookup function should not handle the start AG selection on MRU lookup failure, and nor should the pick function handle building the association that is inserted into the MRU. This leaves the filestreams allocator fairly clean and easy to understand, returning to the caller with an active perag reference and a target block to allocate at. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_trace.h')
-rw-r--r--fs/xfs/xfs_trace.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 107bc8692f23..7dc0fd6a6504 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -668,9 +668,8 @@ DEFINE_FILESTREAM_EVENT(xfs_filestream_lookup);
DEFINE_FILESTREAM_EVENT(xfs_filestream_scan);
TRACE_EVENT(xfs_filestream_pick,
- TP_PROTO(struct xfs_inode *ip, struct xfs_perag *pag,
- xfs_extlen_t free),
- TP_ARGS(ip, pag, free),
+ TP_PROTO(struct xfs_perag *pag, xfs_ino_t ino, xfs_extlen_t free),
+ TP_ARGS(pag, ino, free),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(xfs_ino_t, ino)
@@ -679,8 +678,8 @@ TRACE_EVENT(xfs_filestream_pick,
__field(xfs_extlen_t, free)
),
TP_fast_assign(
- __entry->dev = VFS_I(ip)->i_sb->s_dev;
- __entry->ino = ip->i_ino;
+ __entry->dev = pag->pag_mount->m_super->s_dev;
+ __entry->ino = ino;
if (pag) {
__entry->agno = pag->pag_agno;
__entry->streams = atomic_read(&pag->pagf_fstrms);