xfs
[Top] [All Lists]

[REVIEW] Show pointer address for mem dump with corruption error

To: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Subject: [REVIEW] Show pointer address for mem dump with corruption error
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Fri, 26 Sep 2008 13:23:35 +1000
Organization: SGI
User-agent: Opera Mail/9.52 (Win32)
When XFS detects corruption, it prints a message and a small hex dump
of the offending code.

The first value in this hexdump currently is "0000000:" which is just
the offset into the pointer being passed to print_hex_dump().

The following patch changes this to display the address of the memory
dump:

--- a/fs/xfs/support/debug.c    2008-09-26 13:15:02.000000000 +1000
+++ b/fs/xfs/support/debug.c    2008-09-26 12:53:50.765134441 +1000
@@ -84,5 +84,5 @@ assfail(char *expr, char *file, int line
 void
 xfs_hex_dump(void *p, int length)
 {
- print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_OFFSET, 16, 1, p, length, 1); + print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_ADDRESS, 16, 1, p, length, 1);
 }

<Prev in Thread] Current Thread [Next in Thread>