Re: 2.5.64-mm7 - dies on smp with raid

Neil Brown (neilb@cse.unsw.edu.au)
Sun, 16 Mar 2003 07:42:34 +1100


On Saturday March 15, akpm@digeo.com wrote:
>
> A lot of md updates went into Linus's tree overnight. Can you get some more
> details for Neil?
>
> Here is a wild guess:
>
> diff -puN drivers/md/md.c~a drivers/md/md.c
> --- 25/drivers/md/md.c~a 2003-03-15 12:02:04.000000000 -0800
> +++ 25-akpm/drivers/md/md.c 2003-03-15 12:02:14.000000000 -0800
> @@ -2818,6 +2818,8 @@ int md_thread(void * arg)
>
> void md_wakeup_thread(mdk_thread_t *thread)
> {
> + if (!thread)
> + return;
> dprintk("md: waking up MD thread %p.\n", thread);
> set_bit(THREAD_WAKEUP, &thread->flags);
> wake_up(&thread->wqueue);
>

Looks like a good guess to me.

I hadn't considered raid0/linear properly in that last change suite.
They don't have a thread so there is nothing to wake up.

There are two places where the wrong thing will happen:
do_md_run where it also calls md_update_sb which doesn't
hurt but isn't really needed (there is never any point
updating the superblock metadata for raid0/linear).
restart_array where we switch back to read/write and wakeup
the thread to see if there is anything to do.

We either need this "if(!thread)" test inside md_wakeup_thread
or at those two call sites, in which case we can avoid md_update_sb
as well.

I send one to Linus later...

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