lkml.org 
[lkml]   [2008]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch 3/4] fastboot: make the raid autodetect code wait for all devices to init
On Sunday July 20, arjan@infradead.org wrote:
> On Mon, 21 Jul 2008 09:06:36 +1000
> Neil Brown <neilb@suse.de> wrote:
>
> > if (driver_probe_done() != 0) {
> > printk("md: Waiting for all devices to be available before
> > autodetect\n" "md: If you don't boot off raid, use
> > raid=noautodetect\n"); do
>
>
> how about this patch?

Well,

> - while (driver_probe_done() != 0)
> + printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
> + printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");

that's better thanks. I'm quite happy with that.


> + while (driver_probe_done())
> msleep(100);

That's worse. Now it really looks like a boolean that is being used
wrongly. It seems that driver_probe_done either returns 0 or -EBUSY,
so I'd prefer

> + while (driver_probe_done() < 0)
> msleep(100);

or even

> + while (driver_probe_done() == -EBUSY)
> msleep(100);

though that is less robust.

Thanks,
NeilBrown


\
 
 \ /
  Last update: 2008-07-21 06:55    [W:0.047 / U:22.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site