public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly?
@ 2004-05-20 18:04 Lee Xing
  2004-05-20 18:07 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Xing @ 2004-05-20 18:04 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

>> Mid-layer in lk 2.6 defines two functions, scsi_add_device() and scsi_add_host(),
>> that can be called by low-level drivers based on the document.  I'm not familiar 
>> with lk2.6.  Can low-level drivers in lk2.6 call scsi_add_device( ) to add 
>> newly-attached disks to mid-layer on the fly?

>Yes.  For an example take a look at drivers/ieee1394/sbp2.c.

>> Does lk2.4 provide a similar 
>> function to scsi_add_device( ) in lk2.6?

>No.

Thanks for the information (i.e. lk2.4 doesn't provide similar function to scsi_add_device() in lk2.6).

Does any one know if lk2.4 has **any other ways** low-level drivers can use to notify mid-layer the changes on the attached devices on the fly?

Thanks,


Lee

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

* Re: Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly?
  2004-05-20 18:04 Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly? Lee Xing
@ 2004-05-20 18:07 ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2004-05-20 18:07 UTC (permalink / raw)
  To: Lee Xing; +Cc: linux-scsi

> Does any one know if lk2.4 has **any other ways** low-level drivers can use to notify mid-layer the changes on the attached devices on the fly?

No.  In 2.4.x even the /proc/scsi/scsi variant from userspace is a bug
strictly speaking because any touching of the device list will be racy.

If you want my 2cent as one of the persons who rewrote large portions of
the scsi midlayer during 2.6 in that area:  don't use 2.4.x for any product
that requires dynamic addition/removal of any devices.

Btw, what kind of driver are you working on?  Judging from your mails and
the Crossroads websistes I guess it's yet another iSCSI initiator.  In that
case helping one of the existing projects might make more sense..

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

* RE: Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly?
@ 2004-05-20 19:38 Lee Xing
  2004-05-20 20:01 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Xing @ 2004-05-20 19:38 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-scsi

Thanks for the suggestions and information.  It helps a lot!

We will be using lk 2.6 for sure, but at this time it seems lk 2.6 is still a moving target so we want to wait a while.  Your comments on dynamic addition/removal of devices may make us move to lk 2.6 earlier.

The driver we are working on is a shim that sits in between Linux SCSI mid-layer and our existing modules, and you are right, iSCSI is one of the projects we are working on.

We really appreciate the nice work every one contributes to Linux!

Thanks,


Lee


-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Thursday, May 20, 2004 1:08 PM
To: Lee Xing
Cc: linux-scsi@vger.kernel.org
Subject: Re: Help - can Linux SCSI sub-system add newly-attached
devicesto/dev on the fly?


> Does any one know if lk2.4 has **any other ways** low-level drivers can use to notify mid-layer the changes on the attached devices on the fly?

No.  In 2.4.x even the /proc/scsi/scsi variant from userspace is a bug
strictly speaking because any touching of the device list will be racy.

If you want my 2cent as one of the persons who rewrote large portions of
the scsi midlayer during 2.6 in that area:  don't use 2.4.x for any product
that requires dynamic addition/removal of any devices.

Btw, what kind of driver are you working on?  Judging from your mails and
the Crossroads websistes I guess it's yet another iSCSI initiator.  In that
case helping one of the existing projects might make more sense..

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

* RE: Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly?
  2004-05-20 19:38 Lee Xing
@ 2004-05-20 20:01 ` Arjan van de Ven
  0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2004-05-20 20:01 UTC (permalink / raw)
  To: Lee Xing; +Cc: Christoph Hellwig, linux-scsi

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]


> The driver we are working on is a shim that sits in between Linux SCSI mid-layer and our existing modules, and you are right, iSCSI is one of the projects we are working on.
> 
> We really appreciate the nice work every one contributes to Linux!

I assume that you will be contributing your work too ? (eg your module
is going to be open source ?)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2004-05-20 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-20 18:04 Help - can Linux SCSI sub-system add newly-attached devices to/dev on the fly? Lee Xing
2004-05-20 18:07 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2004-05-20 19:38 Lee Xing
2004-05-20 20:01 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox