From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 02 Feb 2005 21:13:41 +0000 Subject: Re: file creation timing Message-Id: <1107378821.7256.28.camel@localhost.localdomain> List-Id: References: <1107377633.5540.95.camel@localhost> In-Reply-To: <1107377633.5540.95.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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