public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-kernel@vger.kernel.org
Subject: Re: block till hotplug is done?
Date: Wed, 06 Oct 2004 20:19:32 +0600	[thread overview]
Message-ID: <ck0utl$6o0$1@sea.gmane.org> (raw)
In-Reply-To: <1097005927.4953.4.camel@simulacron>

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


  parent reply	other threads:[~2004-10-06 14:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 19:52 block till hotplug is done? Andreas Jellinghaus
2004-10-05 20:13 ` Harald Dunkel
2004-10-05 20:38   ` Valdis.Kletnieks
2004-10-05 22:16     ` Jon Masters
2004-10-05 22:04   ` Andreas Jellinghaus
2004-10-06 14:19 ` Alexander E. Patrakov [this message]
2004-10-08 14:23 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ck0utl$6o0$1@sea.gmane.org' \
    --to=patrakov@ums.usu.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox