public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: A different look at block device hotswap in the Linux kernel
@ 2003-01-24 16:36 Cress, Andrew R
  2003-01-24 18:01 ` Bryan Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Cress, Andrew R @ 2003-01-24 16:36 UTC (permalink / raw)
  To: 'mjacob@feral.com', David Brownell
  Cc: Oliver Neukum, Steven Dake, Luben Tuikov, Alan Stern,
	Matthew Dharm, Mike Anderson, Greg KH, linux-usb-devel,
	Linux SCSI list

My $.02:

The comparing of a saved device list snapshot with the current device should
be the responsibility of a user-space daemon, provided that the kernel
exposes enough information  to uniquely identify the devices (like serial
numbers, or some other UID if no ser num exists).  

The kernel would assume that the device is new (not the same) unless told so
by a daemon that is watching.  

Andy

-----Original Message-----
From: Matthew Jacob [mailto:mjacob@feral.com] 
Sent: Friday, January 24, 2003 10:26 AM
To: David Brownell
Cc: Oliver Neukum; Steven Dake; Luben Tuikov; Alan Stern; Matthew Dharm;
Mike Anderson; Greg KH; linux-usb-devel@lists.sourceforge.net; Linux SCSI
list
Subject: Re: A different look at block device hotswap in the Linux kernel



> >>...
> >
> >
> > Could this time limit be fixed (or parameterized) known to all LLDDs?
> > This would allow one to try and avoid flooding SCSI with detach/reattach
> > events for the 'same' device.
>
> And what exactly is the "same" device?  And who's keeping history
> about devices that have previously been attached?  And, says the guy
> who's full of questions, didn't Linus want to get rid of such history?

Hrmm. That's a damned good point. I was going to say things like "the
FC HBA driver knows that device XYX left the fabric and now has
returned", but if XYZ left the fabric, why am I keeping track of it
still? Once gone, it's gone. I had convinced myself that if an FC device
(re)appears, it's not up to the HBA to say it's the same (the content
may have been changed even if the container tag is the same).

Hrm.


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58
@ 2003-01-21 21:02 Alan Stern
  2003-01-23 18:19 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stern @ 2003-01-21 21:02 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Oliver Neukum, David Brownell, Matthew Dharm, Mike Anderson,
	Greg KH, linux-usb-devel, Linux SCSI list

Here's another question to add to your discussion.

When a device is unplugged, the system's representation of that device
can't be removed immediately; there may be open fd's, mounts, pointers,
and so on.  Until the time comes when all these handles are released, all
interaction with the device has to fail, one way or another.

Whose responsibility is it to fail these interactions?

For something simple, like a USB serial port, it might turn out that the 
low-level device driver gets all these requests and then fails them.  That 
means the driver has to keep track of the fact that the device is no 
longer connected until some reference count goes to 0.

For SCSI and emulated SCSI devices, it might be the one of the SCSI layers 
that keeps track of the fact that the device has disconnected.  Or it 
might be somewhere else in the kernel.

It would nice to have some sort of coherent plan for how to handle this.  
In fact, it ought to be part of the device-driver model that underlies 
sysfs.  But so far as I am aware, there is currently nothing in the sysfs 
documentation to address the problem.

Alan Stern


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

end of thread, other threads:[~2003-01-26 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-24 16:36 A different look at block device hotswap in the Linux kernel Cress, Andrew R
2003-01-24 18:01 ` Bryan Henderson
2003-01-24 18:09   ` Matthew Jacob
2003-01-26 11:26     ` [linux-usb-devel] " Andries Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2003-01-21 21:02 [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58 Alan Stern
2003-01-23 18:19 ` Oliver Neukum
2003-01-23 20:41   ` A different look at block device hotswap in the Linux kernel Steven Dake
2003-01-24  0:07     ` Oliver Neukum
2003-01-24  0:54       ` Steven Dake
2003-01-24  2:35         ` [linux-usb-devel] " Matthew Dharm

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