xfs: fix wrong lookup direction in xfs_refcount_lookup_eq tracepoint
PATCH 1/1 xfs: fix wrong lookup direction in xfs_refcount_lookup_eq tracepoint
From: Jianyun Gao <[email protected]>
The trace_xfs_refcount_lookup() call in xfs_refcount_lookup_eq() passes XFS_LOOKUP_LE. But the actual btree lookup below uses XFS_LOOKUP_EQ, so the trace record reports a mismatched lookup direction and misleads debugging.
--- fs/xfs/libxfs/xfs_refcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_refcount.c +1 -1
@@ -96,7 +96,7 @@ xfs_refcount_lookup_eq( {trace_xfs_refcount_lookup (cur,xfs_refcount_encode_startblock (bno, domain), -XFS_LOOKUP_LE ); +XFS_LOOKUP_EQ ); cur->bc_rec.rc.rc_startblock = bno; cur->bc_rec.rc.rc_blockcount =0 ; cur->bc_rec.rc.rc_domain = domain;
Signature · 1 line
2.34.1
Quoted 18 lines · On Thu, Nov 26, 2026 at 10:34:01AM +0800, [email protected] wrote:
From: Jianyun Gao <[email protected]>
The
trace_xfs_refcount_lookup()call inxfs_refcount_lookup_eq()passesXFS_LOOKUP_LE. But the actual btree lookup below usesXFS_LOOKUP_EQ, so the trace record reports a mismatched lookup direction and misleads debugging.Fixes 08daa3ccf541b8 ("xfs: add repair helpers for the reference count btree")Signed-off-by Jianyun Gao <[email protected]>--- fs/xfs/libxfs/xfs_refcount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_refcount.c +0
-0
fs/xfs/libxfs/xfs_refcount.c xfs_refcount_lookup_eq( · line 102
Quoted 8 lines
fs/xfs/libxfs/xfs_refcount.c +1
-1@@ -96,7 +96,7 @@ xfs_refcount_lookup_eq( {trace_xfs_refcount_lookup (cur,xfs_refcount_encode_startblock (bno, domain), -XFS_LOOKUP_LE ); +XFS_LOOKUP_EQ ); cur->bc_rec.rc.rc_startblock = bno; cur->bc_rec.rc.rc_blockcount =0 ; cur->bc_rec.rc.rc_domain = domain;
Quoted 4 lines
Signature · 1 line
2.34.1
Quoted 6 lines · On Thu, 26 Nov 2026 10:34:01 +0800, [email protected] wrote:
The
trace_xfs_refcount_lookup()call inxfs_refcount_lookup_eq()passesXFS_LOOKUP_LE. But the actual btree lookup below usesXFS_LOOKUP_EQ, so the trace record reports a mismatched lookup direction and misleads debugging.
Applied to for-next, thanks!
[1/1] xfs: fix wrong lookup direction in xfs_refcount_lookup_eq tracepoint
commit: a2a0791c4ef58ce943c7925491f31be95ebc7624
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>