From: cem@kernel.org
To: cem@kernel.org
Cc: linux-xfs@vger.kernek.org, hch@lst.de, sandeen@sandeen.net,
dgc@kernel.org, aalbersh@kernel.org, bfoster@redhat.com,
stable@vger.kernel.org
Subject: [PATCH 1/2] xfs: move _right_neighbor_result trace before erroring out
Date: Wed, 25 Nov 2026 14:26:28 +0100 [thread overview]
Message-ID: <20261125132634.113144-2-cem@kernel.org> (raw)
In-Reply-To: <20261125132634.113144-1-cem@kernel.org>
From: Carlos Maiolino <cem@kernel.org>
The tracepoint doesn't help much if we find an invalid right record.
Move it before we validate the record so it can still be printed even
if we end up jumping to the error label.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
fs/xfs/libxfs/xfs_rmap.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 14aef87837a9..5f88aa9f12cb 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -1082,6 +1082,12 @@ xfs_rmap_map(
error = xfs_rmap_get_rec(cur, >rec, &have_gt);
if (error)
goto out_error;
+
+ trace_xfs_rmap_find_right_neighbor_result(cur,
+ gtrec.rm_startblock, gtrec.rm_blockcount,
+ gtrec.rm_owner, gtrec.rm_offset,
+ gtrec.rm_flags);
+
if (XFS_IS_CORRUPT(mp, have_gt != 1)) {
xfs_btree_mark_sick(cur);
error = -EFSCORRUPTED;
@@ -1092,10 +1098,6 @@ xfs_rmap_map(
error = -EFSCORRUPTED;
goto out_error;
}
- trace_xfs_rmap_find_right_neighbor_result(cur,
- gtrec.rm_startblock, gtrec.rm_blockcount,
- gtrec.rm_owner, gtrec.rm_offset,
- gtrec.rm_flags);
if (!xfs_rmap_is_mergeable(>rec, owner, flags))
have_gt = 0;
}
--
2.56.1
next prev parent reply other threads:[~2026-11-25 13:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 13:26 [PATCH 0/2] xfs: force all shared extent swap to use rmap shared path cem
2026-11-25 13:26 ` cem [this message]
2026-11-25 13:26 ` [PATCH 2/2] " cem
2026-11-25 13:31 ` [PATCH 0/2] " Carlos Maiolino
-- strict thread matches above, loose matches on Subject: below --
2026-11-25 13:31 cem
2026-11-25 13:31 ` [PATCH 1/2] xfs: move _right_neighbor_result trace before erroring out cem
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=20261125132634.113144-2-cem@kernel.org \
--to=cem@kernel.org \
--cc=aalbersh@kernel.org \
--cc=bfoster@redhat.com \
--cc=dgc@kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernek.org \
--cc=sandeen@sandeen.net \
--cc=stable@vger.kernel.org \
/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