From: Patrick Mansfield <patmans@us.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: adding callouts to udev for scsi identifiers/serial numbers
Date: Wed, 08 Oct 2003 22:06:38 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106565105203794@msgid-missing> (raw)
Hi -
I have a scsi_id program intended for use with udev to retrieve SCSI
serial number/id's using INQUIRY page 0x80 or page 0x83. scsi_id dumps a
unique ID to stdout and exit's with zero status; if no id, it exit's with
non-zero status.
I'm working on extending udev to invoke and use the value retrieved via
scsi_id.
For small configurations, adding syntax such as the following to a
namdev.config works OK:
CALLOUT, PROGRAM="/usr/sbin/scsi_id", BUS="scsi", ID="200609487340b71da", NAME="disk-1"
I have a udev patch for the above (and can post it if anyone wants to see
it).
For larger configurations, with many disks in a namdev.config file (my
test system has about 50 entries) each configuration line calls out to get
the id, and things slow down quite a bit.
For example, running (via command line) udev + scsi_id for 48 /sys/block
entries with a corresponding number of callout entries in namedev.config
takes about 15 seconds; a simple (not fully functional) caching of the
scsi_id results gets this down to about 1.3 seconds.
In order to call out and cache one time, I was thinking of adding
namedev.config syntax like:
SET=somevar1, BUS="scsi", PROGRAM="/usr/sbin/scsi_id"
USE=somevar1, BUS="scsi", ID="200609487340b71da", NAME="disk-1"
USE=somevar1, BUS="scsi", ID="somenumber", NAME="disk-2"
Any comments or suggestions on the above?
Thanks.
-- Patrick Mansfield
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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 reply other threads:[~2003-10-08 22:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-08 22:06 Patrick Mansfield [this message]
2003-10-14 22:40 ` adding callouts to udev for scsi identifiers/serial numbers Greg KH
2003-10-15 0:31 ` Patrick Mansfield
2003-10-15 18:27 ` Greg KH
2003-10-15 19:48 ` Patrick Mansfield
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=marc-linux-hotplug-106565105203794@msgid-missing \
--to=patmans@us.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).