All of lore.kernel.org
 help / color / mirror / Atom feed
* adding callouts to udev for scsi identifiers/serial numbers
@ 2003-10-08 22:06 Patrick Mansfield
  2003-10-14 22:40 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Patrick Mansfield @ 2003-10-08 22:06 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding callouts to udev for scsi identifiers/serial numbers
  2003-10-08 22:06 adding callouts to udev for scsi identifiers/serial numbers Patrick Mansfield
@ 2003-10-14 22:40 ` Greg KH
  2003-10-15  0:31 ` Patrick Mansfield
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2003-10-14 22:40 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Oct 08, 2003 at 03:06:38PM -0700, Patrick Mansfield wrote:
> 
> 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.

Any pointer to where this program is located at?

> 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?

Caching is good.  And yes, something like the above is needed.  Hm, but
how can we pass command line arguments to the program to be run?

thanks,

greg k-h


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding callouts to udev for scsi identifiers/serial numbers
  2003-10-08 22:06 adding callouts to udev for scsi identifiers/serial numbers Patrick Mansfield
  2003-10-14 22:40 ` Greg KH
@ 2003-10-15  0:31 ` Patrick Mansfield
  2003-10-15 18:27 ` Greg KH
  2003-10-15 19:48 ` Patrick Mansfield
  3 siblings, 0 replies; 5+ messages in thread
From: Patrick Mansfield @ 2003-10-15  0:31 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 14, 2003 at 03:40:54PM -0700, Greg KH wrote:

> Any pointer to where this program is located at?

Not yet, I'm presently having password problems to an external web page.

> > 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?
> 
> Caching is good.  And yes, something like the above is needed.  Hm, but
> how can we pass command line arguments to the program to be run?

I have a scsi_id.config file that can be used to set global and per SCSI
vendor + product specific options, but arguments could also be passed via
the PROGRAM string.

-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding callouts to udev for scsi identifiers/serial numbers
  2003-10-08 22:06 adding callouts to udev for scsi identifiers/serial numbers Patrick Mansfield
  2003-10-14 22:40 ` Greg KH
  2003-10-15  0:31 ` Patrick Mansfield
@ 2003-10-15 18:27 ` Greg KH
  2003-10-15 19:48 ` Patrick Mansfield
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2003-10-15 18:27 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Oct 14, 2003 at 05:31:02PM -0700, Patrick Mansfield wrote:
> On Tue, Oct 14, 2003 at 03:40:54PM -0700, Greg KH wrote:
> > > 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?
> > 
> > Caching is good.  And yes, something like the above is needed.  Hm, but
> > how can we pass command line arguments to the program to be run?
> 
> I have a scsi_id.config file that can be used to set global and per SCSI
> vendor + product specific options, but arguments could also be passed via
> the PROGRAM string.

But how could they, as we pass the argc and argv from the udev call to
the program defined in the PROGRAM string?  Hm, maybe we shouldn't do
that, and rely on command line arguments?

thanks,

greg k-h


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding callouts to udev for scsi identifiers/serial numbers
  2003-10-08 22:06 adding callouts to udev for scsi identifiers/serial numbers Patrick Mansfield
                   ` (2 preceding siblings ...)
  2003-10-15 18:27 ` Greg KH
@ 2003-10-15 19:48 ` Patrick Mansfield
  3 siblings, 0 replies; 5+ messages in thread
From: Patrick Mansfield @ 2003-10-15 19:48 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Oct 15, 2003 at 11:27:34AM -0700, Greg KH wrote:
> On Tue, Oct 14, 2003 at 05:31:02PM -0700, Patrick Mansfield wrote:

> > I have a scsi_id.config file that can be used to set global and per SCSI
> > vendor + product specific options, but arguments could also be passed via
> > the PROGRAM string.
> 
> But how could they, as we pass the argc and argv from the udev call to
> the program defined in the PROGRAM string?  Hm, maybe we shouldn't do
> that, and rely on command line arguments?

I meant just add to the PROGRAM string, like:

	PROGRAM="scsi_id -g"

And add to argc and argv as needed, for example to pass through the
subsystem argument.

-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-15 19:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08 22:06 adding callouts to udev for scsi identifiers/serial numbers Patrick Mansfield
2003-10-14 22:40 ` Greg KH
2003-10-15  0:31 ` Patrick Mansfield
2003-10-15 18:27 ` Greg KH
2003-10-15 19:48 ` Patrick Mansfield

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.