* [PATCH] xfs_logprint: print log data to the screen in host-endian order
@ 2026-01-06 18:53 Darrick J. Wong
2026-01-07 6:13 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2026-01-06 18:53 UTC (permalink / raw)
To: Andrey Albershteyn; +Cc: xfs
From: Darrick J. Wong <djwong@kernel.org>
Don't make support have to byteswap u32 values when they're digging
through broken logs on x86 systems. Also make it more obvious which
column is the offset and which are the byte(s).
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
logprint/log_print_all.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c
index 0afad597bb6ce0..9c3cd5fb5cfb31 100644
--- a/logprint/log_print_all.c
+++ b/logprint/log_print_all.c
@@ -55,8 +55,8 @@ xlog_recover_print_data(
while (j < nums) {
if ((j % 8) == 0)
- printf("%2x ", j);
- printf("%8x ", *dp);
+ printf("%2x: ", j);
+ printf("%08x ", be32_to_cpu(*dp));
dp++;
j++;
if ((j % 8) == 0)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_logprint: print log data to the screen in host-endian order
2026-01-06 18:53 [PATCH] xfs_logprint: print log data to the screen in host-endian order Darrick J. Wong
@ 2026-01-07 6:13 ` Christoph Hellwig
2026-01-07 17:22 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2026-01-07 6:13 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Andrey Albershteyn, xfs
On Tue, Jan 06, 2026 at 10:53:37AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Don't make support have to byteswap u32 values when they're digging
> through broken logs on x86 systems. Also make it more obvious which
> column is the offset and which are the byte(s).
I like the new output style. But this might break existing setups
(or old users :)). So maybe make this conditional on a command line
option instead?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_logprint: print log data to the screen in host-endian order
2026-01-07 6:13 ` Christoph Hellwig
@ 2026-01-07 17:22 ` Darrick J. Wong
0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2026-01-07 17:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andrey Albershteyn, xfs
On Tue, Jan 06, 2026 at 10:13:29PM -0800, Christoph Hellwig wrote:
> On Tue, Jan 06, 2026 at 10:53:37AM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Don't make support have to byteswap u32 values when they're digging
> > through broken logs on x86 systems. Also make it more obvious which
> > column is the offset and which are the byte(s).
>
> I like the new output style. But this might break existing setups
> (or old users :)). So maybe make this conditional on a command line
> option instead?
Ok.
--D
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-07 17:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 18:53 [PATCH] xfs_logprint: print log data to the screen in host-endian order Darrick J. Wong
2026-01-07 6:13 ` Christoph Hellwig
2026-01-07 17:22 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox