lkml.org 
[lkml]   [2013]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: btrfs zero divide
On Tue, Jul 30, 2013 at 07:02:29PM +0000, Thorsten Glaser wrote:
> Josef Bacik dixit:
>
> >Can you gdb btrfs.ko and do
> >
> >list *(__btrfs_map_block+0x11c)
>
> Not easily (the kernel image is from a .deb package),
> and even in a compile tree gdb just says:
> No symbol table is loaded. Use the "file" command.
>
> With a bit of cheating and a cross-compiler, this is:
>
> (gdb) list *0x0000106e
> 0x106e is in __btrfs_map_block (/var/lib/gforge/chroot/home/users/tg/Xl/linux-3.10.1/fs/btrfs/volumes.c:4447).
> 4442 stripe_nr = offset;
> 4443 /*
> 4444 * stripe_nr counts the total number of stripes we have to stride
> 4445 * to get to this block
> 4446 */
> 4447 do_div(stripe_nr, stripe_len);
> 4448
> 4449 stripe_offset = stripe_nr * stripe_len;
> 4450 BUG_ON(offset < stripe_offset);
> 4451
>

So stripe_len shouldn't be 0, if it is you have bigger problems :). Is this a
corrupt fs or something? If there was some sort of corruption that occured then
I suppose stripe_len could be 0 and we'd need to catch that somewhere higher up
the stack and error out. Is there a way you could check and see if that's the
case? Thanks,

Josef


\
 
 \ /
  Last update: 2013-07-30 23:01    [W:0.792 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site