* [PATCH 0/3] Add disk hotswap support to libata
@ 2005-07-21 21:14 Lukasz Kosewski
2005-07-21 21:58 ` Michael Tokarev
2005-07-22 1:35 ` Jeff Garzik
0 siblings, 2 replies; 7+ messages in thread
From: Lukasz Kosewski @ 2005-07-21 21:14 UTC (permalink / raw)
To: jgarzik, linux-scsi; +Cc: linux-kernel
Hey all, introductory blurb here.
This sequence of patches will add a framework to libata to allow for
hot-swapping disks in and out.
There are three patches:
01-promise_sataII150_support
02-libata_hotswap_infrastructure
03-promise_hotswap_support
The rationale for each will be described in following emails.
I encourage anyone with design ideas to come forward and contribute, and
anyone who can see concurrency problems (I will describe what I see as
issues along with the second patch) to suggest fixes.
Thus far, I've tested this HEAVILY with a 2.6.11.12 kernel +
2.6.11-libata-dev1.patch. I have found no issues outstanding on that
kernel. All testing was done with Promise SATA150 and SATAII150 Tx4/Tx2
Plus controllers and a huge variety of Western Digital and Seagate disks.
I have ported my patches to 2.6.13-rc3 and 2.6.13-rc3-mm1, and have
tested on the latter as well; they work identically to the 2.6.11 tests
except for a breakage in the SCSI layer [1].
The patches I will attach apply to the latter (2.6.13-rc3-mm1) tree,
since I expect that by the time people start looking at them seriously,
the existing libata patches in that tree will have become part of
mainline. If this is NOT the right thing to do, please tell me, and
I'll submit patches for the requested kernel version.
Enjoy!
Luke Kosewski
Human Cannonball
Net Integration Technologies
[1] The SCSI error on 2.6.13-rc3-mm1 that I found:
'echo "scsi add-single-device a b c d" > /proc/scsi/scsi' //works, or
no-op if the sd corresponding to that device is there already
'echo "scsi remove-single-device a b c d" > /proc/scsi/scsi' //works
'echo "scsi add-single-device a b c d" > /proc/scsi/scsi' //works
'echo "scsi remove-single-device a b c d" > /proc/scsi/scsi' //FAILS
As such, since the same underlying functions are called by hotplugging,
you will only be able to remove a disk from a device once before it
fails, until this error is fixed. I'll look into it as well.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-21 21:14 [PATCH 0/3] Add disk hotswap support to libata Lukasz Kosewski
@ 2005-07-21 21:58 ` Michael Tokarev
2005-07-21 22:14 ` Lukasz Kosewski
2005-07-22 1:35 ` Jeff Garzik
1 sibling, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2005-07-21 21:58 UTC (permalink / raw)
To: Lukasz Kosewski; +Cc: jgarzik, linux-scsi, linux-kernel
Lukasz Kosewski wrote:
[]
> [1] The SCSI error on 2.6.13-rc3-mm1 that I found:
> 'echo "scsi add-single-device a b c d" > /proc/scsi/scsi' //works, or
> no-op if the sd corresponding to that device is there already
> 'echo "scsi remove-single-device a b c d" > /proc/scsi/scsi' //works
> 'echo "scsi add-single-device a b c d" > /proc/scsi/scsi' //works
> 'echo "scsi remove-single-device a b c d" > /proc/scsi/scsi' //FAILS
echo -n 1 > /sys/.../hostA/targetA:B:C/A:B:C:D/delete
still works. I think.
And (again, I think) this same problem exists with 2.6.11 as well.
At least, I wasn't able to remove-single-device even once (I discovered
this mechanism only recently, haven't tried it with other kernels).
> As such, since the same underlying functions are called by hotplugging,
> you will only be able to remove a disk from a device once before it
> fails, until this error is fixed. I'll look into it as well.
/mjt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-21 21:58 ` Michael Tokarev
@ 2005-07-21 22:14 ` Lukasz Kosewski
0 siblings, 0 replies; 7+ messages in thread
From: Lukasz Kosewski @ 2005-07-21 22:14 UTC (permalink / raw)
To: Michael Tokarev; +Cc: jgarzik, linux-scsi, linux-kernel
Michael Tokarev wrote:
> echo -n 1 > /sys/.../hostA/targetA:B:C/A:B:C:D/delete
> still works. I think.
> And (again, I think) this same problem exists with 2.6.11 as well.
> At least, I wasn't able to remove-single-device even once (I discovered
> this mechanism only recently, haven't tried it with other kernels).
You're both correct and incorrect based on my testing; in 2.6.11.12, I
have no problems.
However, in 2.6.13-rc1-mm1, you're right that echoing 1 into the delete
node does remove the device.
It seems that there is some issue with the 'scsi_device_lookup' function
then?
I'd have to debug further.
Luke Kosewski
Human Cannonball
Net Integration Technologies
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-21 21:14 [PATCH 0/3] Add disk hotswap support to libata Lukasz Kosewski
2005-07-21 21:58 ` Michael Tokarev
@ 2005-07-22 1:35 ` Jeff Garzik
2005-07-22 18:31 ` Lukasz Kosewski
2005-07-28 18:54 ` Doug Maxey
1 sibling, 2 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-07-22 1:35 UTC (permalink / raw)
To: Lukasz Kosewski; +Cc: linux-scsi, linux-kernel, linux-ide@vger.kernel.org
Lukasz Kosewski wrote:
> Hey all, introductory blurb here.
>
> This sequence of patches will add a framework to libata to allow for
> hot-swapping disks in and out.
>
> There are three patches:
> 01-promise_sataII150_support
> 02-libata_hotswap_infrastructure
> 03-promise_hotswap_support
Pretty cool stuff!
As soon as I finish SATA ATAPI (this week[end]), I'll take a look at
this. A quick review of the patches didn't turn up anything terribly
objectionable, though :)
Jeff
P.S. You might want to CC linux-ide as well, on libata patches.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-22 1:35 ` Jeff Garzik
@ 2005-07-22 18:31 ` Lukasz Kosewski
2005-07-28 18:54 ` Doug Maxey
1 sibling, 0 replies; 7+ messages in thread
From: Lukasz Kosewski @ 2005-07-22 18:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-scsi, linux-kernel, linux-ide
On 7/21/05, Jeff Garzik <jgarzik@pobox.com> wrote:
>
> Pretty cool stuff!
>
> As soon as I finish SATA ATAPI (this week[end]), I'll take a look at
> this. A quick review of the patches didn't turn up anything terribly
> objectionable, though :)
Excellent! Thanks for the quick turnaround!
> P.S. You might want to CC linux-ide as well, on libata patches.
I've CCed the original patches to Linux-ide for comments. Also, I've
re-sent patch 3 with a minor fix to boolean logic with bits.
Enjoy!
Luke Kosewski
Human Cannonball
Net Integration Technologies
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-22 1:35 ` Jeff Garzik
2005-07-22 18:31 ` Lukasz Kosewski
@ 2005-07-28 18:54 ` Doug Maxey
2005-07-28 19:05 ` Jeff Garzik
1 sibling, 1 reply; 7+ messages in thread
From: Doug Maxey @ 2005-07-28 18:54 UTC (permalink / raw)
To: Jeff Garzik
Cc: Lukasz Kosewski, linux-scsi, linux-kernel,
linux-ide@vger.kernel.org
On Thu, 21 Jul 2005 21:35:24 EDT, Jeff Garzik wrote:
>As soon as I finish SATA ATAPI (this week[end]), I'll take a look at
>this. A quick review of the patches didn't turn up anything terribly
>objectionable, though :)
>
I would like to offer to test when you are ready. Some older and new SATAPI
drives, various chipsets (ICH{5,6}, TX4 on the way). And a SATA analyzer
for anything really odd.
++doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Add disk hotswap support to libata
2005-07-28 18:54 ` Doug Maxey
@ 2005-07-28 19:05 ` Jeff Garzik
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2005-07-28 19:05 UTC (permalink / raw)
To: Doug Maxey
Cc: Lukasz Kosewski, linux-scsi, linux-kernel,
linux-ide@vger.kernel.org
Doug Maxey wrote:
> On Thu, 21 Jul 2005 21:35:24 EDT, Jeff Garzik wrote:
>
>>As soon as I finish SATA ATAPI (this week[end]), I'll take a look at
>>this. A quick review of the patches didn't turn up anything terribly
>>objectionable, though :)
>>
>
>
> I would like to offer to test when you are ready. Some older and new SATAPI
> drives, various chipsets (ICH{5,6}, TX4 on the way). And a SATA analyzer
> for anything really odd.
Great!
It'll be posted here on linux-ide, so just keep an eye out.
Analysis of any portion of libata, with a SATA analyzer, would be much
appreciated.
Jeff
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-07-28 19:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 21:14 [PATCH 0/3] Add disk hotswap support to libata Lukasz Kosewski
2005-07-21 21:58 ` Michael Tokarev
2005-07-21 22:14 ` Lukasz Kosewski
2005-07-22 1:35 ` Jeff Garzik
2005-07-22 18:31 ` Lukasz Kosewski
2005-07-28 18:54 ` Doug Maxey
2005-07-28 19:05 ` Jeff Garzik
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).