Re: block till hotplug is done?

From: Alexander E. Patrakov
Date: Wed Oct 06 2004 - 09:21:04 EST


Andreas Jellinghaus wrote:
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.

You can't wait gracefully (i.e. without sleeping), but you can duplicate udev's work synchronously:

fdisk
udevstart
mkfs

I don't know if this is supposed to work (Greg KH: please comment on this). It _will_ work if sysfs entries are guaranteed to be created before the BLKRRPART ioctl returns.

--
Alexander E. Patrakov

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