Re: kupdated, bdflush and kjournald stuck in D state on RAID1 device (deadlock?)

David Rees (dbr@greenhydrant.com)
Wed, 29 Aug 2001 17:55:41 -0700


On Thu, Aug 30, 2001 at 10:39:16AM +1000, Neil Brown wrote:
>
> Thanks David and Andrew for providing all the helpful details.
> I know what happened. As Andrew said, the raid1 buffers have simply
> disappeared into thin air.
> The line that makes them invisible is
> r1_bh->state = 0;
> at line 165 in drivers/md/raid1.c. This should be more like
> r1_bh->state = (1 << R1BH_PreAlloc);
> We need to clear the Uptodate bit and the Phase bit, but not
> the prealloc bit.
>
> Linus: Please consider applying this patch.
>
> NeilBrown
>
> --- drivers/md/raid1.c 2001/08/30 00:36:54 1.1
> +++ drivers/md/raid1.c 2001/08/30 00:37:03
> @@ -162,7 +162,7 @@
> conf->freer1 = r1_bh->next_r1;
> conf->freer1_cnt--;
> r1_bh->next_r1 = NULL;
> - r1_bh->state = 0;
> + r1_bh->state = (1 << R1BH_PreAlloc);
> r1_bh->bh_req.b_state = 0;
> }
> md_spin_unlock_irq(&conf->device_lock);

Since rebooting, I haven't encountered any problems (but I did lose a lot of
data on that partition!). I'll apply this patch and let you know if
anything strange happens. Otherwise assume that it works for me.

I'm curious, why hasn't this bug shown up before? Did I just get unlucky?
Or is everyone else using software raid1 without problems lucky? 8)

-Dave
-
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/