xfs
[Top] [All Lists]

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

To: Barry Naujok <bnaujok@xxxxxxx>
Subject: Re: [REVIEW] Show pointer address for mem dump with corruption error
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 25 Sep 2008 23:06:05 -0500
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
In-reply-to: <op.uh2jplxz3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <op.uh2jplxz3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
Barry Naujok wrote:
> 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);
>   }
> 
> 

Looks fine (and a fine idea) to me :)

-Eric

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