block till hotplug is done?

From: Andreas Jellinghaus
Date: Tue Oct 05 2004 - 14:53:49 EST


Hi,

is there any way to block till all hotplug events are handled/
the hotplug processes terminated?

For example
fdisk
mkfs
fails, because after fdisk create a partition, and the kernel
reread the partition table, called hotplug, hotplug called udev
and udev created the matching /dev file, all of that might be
too slow and mkfs might fail in the mean time.

even
fdisk
sleep 2
mkfs
sometimes failes with machines I'm installing.

so I can either randomly increase the delay everytime the installation
fails because the device isn't created in time, or I can create the
devices myself with mkdev, which defeats the whole purpose of hotplug
and udev. Or - preferable - I would want to wait till something
tells me the device is there. some way to sleep till not kernel
triggered hotlug process is running any more, that would be nice.
does the kernel keep track of it's hotplug processes? is there such
a way to wait till they are all done?

(and would that work, if hotplug spawned some child process/daemon, i.e.
not wait for the daemon to end?)

Regards, Andreas

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