[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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


Reply to: