From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: file creation timing
Date: Wed, 02 Feb 2005 21:13:41 +0000 [thread overview]
Message-ID: <1107378821.7256.28.camel@localhost.localdomain> (raw)
In-Reply-To: <1107377633.5540.95.camel@localhost>
On Wed, 2005-02-02 at 12:53 -0800, Dave Hansen wrote:
> For memory hotplug, I register each of my memory kobjects, followed by
> their individual files. I'm seeing races where the hotplug scripts get
> the event for the main register before all of the control files are
> there.
>
> ret = register_memory(mem, section, NULL);
> mem_create_simple_file(mem, phys_index);
> mem_create_simple_file(mem, state);
> mem_create_simple_file(mem, phys_device);
>
> The script sees the /sys/.../memory directory before it sees the "state"
> file. Is there a handy way around this other than sleeping in the
> script?
You may use udev to manage the hotplug events by setting /sbin/udevsend
as the hotplug helper. It will wait until sysfs is populated.
> Can I somehow delay that registration event?
No, not today, not without doing crazy stuff.
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2005-02-02 21:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-02 20:53 file creation timing Dave Hansen
2005-02-02 21:13 ` Kay Sievers [this message]
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=1107378821.7256.28.camel@localhost.localdomain \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.