From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: inconsistent renaming of devices
Date: Mon, 09 Feb 2004 05:51:16 +0000 [thread overview]
Message-ID: <20040209055116.GA17406@in.ibm.com> (raw)
In-Reply-To: <marc-linux-hotplug-107165372413670@msgid-missing>
On Sun, Feb 08, 2004 at 03:13:23PM +0100, Olaf Hering wrote:
>
> No, that was about that fact that block (and scsi) events run much
> earlier than expected. The properties below /block/sda/device/ and
> /sys/bus/*/devices/$bus_id appear to late, the result is that the
> BUS="scsi" rule doesnt match and it falls through to the BUS="usb" rule.
> I have to add sleep 3 in case of my USB stick.
>
> It would make sense to run the /block/sda event just before the
> /block/sda/sda1 event (if there is a partition table). sda1 has always
> all properties in /block/sda/sda1/../device/
>
> sysfs_path_is_link() does a stat(/sys/bus/*/devices/$bus_id) and this does
> not exist.
>
> Now, this little hack, and the result looks much better.
Wouldn't it be much better if you increase the wait time in get_sysfs_device()
in namedev.c from 10ms instead of adding a retry loop?
> @@ -79,6 +82,12 @@ int sysfs_get_device_bus(struct sysfs_de
> }
> }
> }
> + if(--retries) {
> + dprintf("sleep one second for %s\n", dev->bus_id);
> + sleep(1);
> + dprintf("retries left: %d\n", retries);
> + goto retry;
> + }
> sysfs_close_list(buslist);
> }
> return -1;
I am not in favour of sleep()ing inside the library. I'd rather the app handle
sleep and retries :)
Thanks,
Ananth
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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
next prev parent reply other threads:[~2004-02-09 5:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-17 9:33 inconsistent renaming of devices Martin Lorenz
2003-12-17 18:13 ` Greg KH
2004-02-05 6:40 ` Surekha.PC
2004-02-05 8:56 ` Greg KH
2004-02-05 9:56 ` Olaf Hering
2004-02-05 10:11 ` Surekha.PC
2004-02-05 23:49 ` Greg KH
2004-02-05 23:51 ` Greg KH
2004-02-06 0:18 ` Kay Sievers
2004-02-06 6:34 ` Surekha.PC
2004-02-06 9:18 ` 'Kay Sievers'
2004-02-06 11:29 ` Surekha.PC
2004-02-08 14:13 ` Olaf Hering
2004-02-09 5:51 ` Ananth N Mavinakayanahalli [this message]
2004-02-09 6:31 ` Olaf Hering
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=20040209055116.GA17406@in.ibm.com \
--to=ananth@in.ibm.com \
--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.