* Re: [linux-usb-devel] Re: A different look at block device hotswap in the Linux kernel
2003-01-24 0:54 ` Steven Dake
@ 2003-01-24 2:35 ` Matthew Dharm
0 siblings, 0 replies; 5+ messages in thread
From: Matthew Dharm @ 2003-01-24 2:35 UTC (permalink / raw)
To: Steven Dake
Cc: Oliver Neukum, Luben Tuikov, Alan Stern, David Brownell,
Mike Anderson, Greg KH, linux-usb-devel, Linux SCSI list
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
On Thu, Jan 23, 2003 at 05:54:57PM -0700, Steven Dake wrote:
> >I want:
> >LLDD to SCSI: device is gone
> >SCSI to LLDD: Ok. I'll handle from here on.
> >LLDD: OK. I am gone. And won't have any contact until the next device is
> >plugged in.
> >
> >
> The downside of this approach is that the LLDD must now be able to
> detect insertions and removals when it may not be able to do so. If it
> is able to do so, then fine, it can tell upper layers about it, but the
> actual control of removal of a device should occur higher up to fix
> several problems with the approach of having the LLDD manage the hotswap
> state of the device.
Huh?
Aren't we talking about a hotplug scenario? How can you talk about the
'LLDD must now be able to detect... when it may not be able to do so.'?
Oh... I see. We keep talking about devices. I'm trying to hotswap an
entire host, which is mapped to a single USB device.
But the theory is the same, really.
In the end, you can only hotswap something that is hotswapable. That means
that the driver has to support the hotswap system, whatever it is.
If you can't support hotswap detection, then this entire scenario is
reduced to 'what happens if I blow a FET on my HD', because it's the exact
same thing. Recovering from fatal error is a separate discussion.
Matt
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
A: The most ironic oxymoron wins ...
DP: "Microsoft Works"
A: Uh, okay, you win.
-- A.J. & Dust Puppy
User Friendly, 1/18/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* 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: A different look at block device hotswap in the Linux kernel
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
0 siblings, 1 reply; 5+ messages in thread
From: Bryan Henderson @ 2003-01-24 18:01 UTC (permalink / raw)
To: Cress, Andrew R
Cc: andmike, David Brownell, Greg KH, Linux SCSI list,
linux-usb-devel, Luben Tuikov, Matthew Dharm,
'mjacob@feral.com', Oliver Neukum, Steven Dake,
Alan Stern
>The comparing of a saved device list snapshot with the current device
should
>be the responsibility of
>From a usability standpoint, I don't think any such comparing should be
done by anyone. When I unplug a device and then plug it in again, I want a
total reset. I'm willing to take my lumps if I unplug something that isn't
in a state to be safely unplugged.
It's like when I pull the power plug because my system is totally hosed and
I want to start over. I know I can cause damage by doing that, but I would
be upset if the new system booted back to the broken state it was in when I
unplugged it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: A different look at block device hotswap in the Linux kernel
2003-01-24 18:01 ` Bryan Henderson
@ 2003-01-24 18:09 ` Matthew Jacob
2003-01-26 11:26 ` [linux-usb-devel] " Andries Brouwer
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Jacob @ 2003-01-24 18:09 UTC (permalink / raw)
To: Bryan Henderson
Cc: Cress, Andrew R, andmike, David Brownell, Greg KH,
Linux SCSI list, linux-usb-devel, Luben Tuikov, Matthew Dharm,
Oliver Neukum, Steven Dake, Alan Stern
>
> It's like when I pull the power plug because my system is totally hosed and
> I want to start over. I know I can cause damage by doing that, but I would
> be upset if the new system booted back to the broken state it was in when I
> unplugged it.
I had this conversation with doug offlist- this is a policy choice. You
may want your device to reattach as totally new. You may, on the other
hand, want your device to resume where you left off. I can see valid
reasons for wanting either behaviour (but it can't/shouldn't be deduced
by the OS).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-usb-devel] RE: A different look at block device hotswap in the Linux kernel
2003-01-24 18:09 ` Matthew Jacob
@ 2003-01-26 11:26 ` Andries Brouwer
0 siblings, 0 replies; 5+ messages in thread
From: Andries Brouwer @ 2003-01-26 11:26 UTC (permalink / raw)
To: Matthew Jacob
Cc: Bryan Henderson, Cress, Andrew R, andmike, David Brownell,
Greg KH, Linux SCSI list, linux-usb-devel, Luben Tuikov,
Matthew Dharm, Oliver Neukum, Steven Dake, Alan Stern
On Fri, Jan 24, 2003 at 10:09:32AM -0800, Matthew Jacob wrote:
> > It's like when I pull the power plug because my system is totally hosed and
> > I want to start over. I know I can cause damage by doing that, but I would
> > be upset if the new system booted back to the broken state it was in when I
> > unplugged it.
>
> You may want your device to reattach as totally new. You may, on the other
> hand, want your device to resume where you left off. I can see valid
> reasons for wanting either behaviour (but it can't/shouldn't be deduced
> by the OS).
The kernel does not remember this device once it is gone.
If user space thinks it recognizes it, it must have a means to
tell the kernel what it should do. What kind of info?
The only thing that I can think of right now is the name.
User space may tell the kernel under what name a device should
be accessible.
[Today user space can tell the kernel the numbering of the partitions.]
More generally, the question of what "same device" means
depends on the application. Is /dev/fd0 the same device
as /dev/fd0 also when the floppy is different?
Yes, the name is the same. The contents not.
In all cases user space does not tell the kernel "it is the same as ..."
since the kernel does not remember anyway. User space just instructs
the kernel to do certain definite things.
Andries
^ 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