2002-06-06 10:22:30

by Itai Nahshon

[permalink] [raw]
Subject: Fwd: Patch - SCSI host numbers - please apply

This was sent on Apr 22 and probably lost.
This patch still applies cleanly to 2.4.19-pre10.

Can this get in the kernel before 2.4.19 final ?

-- Itai

---------- Forwarded Message ----------

Subject: Patch - SCSI host numbers - please apply
Date: Mon, 22 Apr 2002 09:19:56 +0300
From: Itai Nahshon <[email protected]>
To: Marcelo Tosatti <[email protected]>, Jens Axboe <[email protected]>

Hello,
I think this has gone through enough testing...

History:
A similar patch was submitted to to lkml and to linux-scsi
two months ago. Verified by Aron Zeh <[email protected]> on Apr 9.
The attached patch is a cleaned-up version
(The original had #ifdef'ed the code that this one removes).

Kernel version info:
2.4.x: Patch applies cleanly (and tested with) all 2.4.19-preX
kernels.
2.5.x: Patch applies with 8 line offset to 2.5.8.
Bug verified only by "visual inspection". (but really nothing
in the host_no allocation algorithm has changed since 2.4).

Bug info:
Actually fixing two _different_ scenarios that look almost the same.
Need two or more) scsi host adapters that are not required for
normal system usage. I uses ide-scsi and usb-storage fr my
tests. Start with a "clean system" (before any of these drivers
is loaded). Suppose scsi host adapter drivers are named A and B.

scenario 1:
insmod A
rmmod A
insmod A
insmod B

scenario 2:
insmod A
rmmod A
insmod B
insmod A

Without the patch, both scenarios end with both host adapters having
the same host_no.

More tests:
I tested also with param scsihosts=<host0>:<host1>:....
(when loading scsi_mod)

Comment/motivation:
This keeps max_scsi_host coherent with the length of the list
scsi_host_no_list. Since we never shorten the list
we should never decrement max_scsi_host.

Sincerely,
-- Itai

-------------------------------------------------------


Attachments:
scsi-host_no_fix.patch (1.10 kB)

2002-06-12 22:57:53

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: Fwd: Patch - SCSI host numbers - please apply


On Thu, 6 Jun 2002, Itai Nahshon wrote:

> This was sent on Apr 22 and probably lost.
> This patch still applies cleanly to 2.4.19-pre10.
>
> Can this get in the kernel before 2.4.19 final ?

No. I dont consider the problem very serious for inclusion of the patch
now.

Resend me at 2.4.20pre time

Thanks