Re: raid-5 broken in 2.3.99pre9?

From: Neil Brown (neilb@cse.unsw.edu.au)
Date: Wed May 31 2000 - 01:20:04 EST


On Tuesday May 30, nils@ipe.uni-stuttgart.de wrote:
> What I did:
>
> create /etc/raidtab like this:
>
> raiddev /dev/md0
> raid-level 5
...
>
> Then ran mkraid /dev/md0 and got:
>
> [...]
> kernel BUG at raid5.c:211
> invalid operand: 0000
> CPU: 0
> EIP: 0010:[<c01bed54>]
> EFLAGS: 00010086
> [...]

Looks like a bug all right.

When a raid5 array is enabled, a few megabytes of kernel memory is
allocated to provide a stripe cache.
If you get a kmalloc failure, it can call
   __put_free_stripe
which expects the device to be locked, but at this stage it isn't.

Could your machine be running low on memory?

Probably the simplest fix is to initialise conf->device_lock
to MD_SPIN_LOCK_LOCKED on line 1768, and the unlock the device when it
is all set up, but I haven't looked closely.

I will add this to my todo list.

Thanks,
NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:26 EST