* [PATCH] LLDD dynamic scan aids
@ 2004-11-17 19:03 James.Smart
2004-11-18 10:46 ` Christoph Hellwig
0 siblings, 1 reply; 14+ messages in thread
From: James.Smart @ 2004-11-17 19:03 UTC (permalink / raw)
To: linux-scsi
This patch contains the following 2 modifications:
- Allows scsi_scan_host() to be called at times other than just first attachment.
- Provides a new interface to scan a single target entity.
This allows our LLDD to automatically detect new device additions after a cable/fabric change, or upon insertion of a new FC device.
Note: We opted for a "scan target" interface as, on large configurations, scanning everything on the link via scsi_scan_host() was overkill.
-- James S
diff -uNr linux-2.6.10-rc2/drivers/scsi/scsi_scan.c linux-2.6.10-rc2.patch/drivers/scsi/scsi_scan.c
--- linux-2.6.10-rc2/drivers/scsi/scsi_scan.c 2004-11-17 13:58:40.370677976 -0500
+++ linux-2.6.10-rc2.patch/drivers/scsi/scsi_scan.c 2004-11-17 13:58:40.378676760 -0500
@@ -1223,7 +1223,20 @@
void scsi_scan_host(struct Scsi_Host *shost)
{
scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
- SCAN_WILD_CARD, 0);
+ SCAN_WILD_CARD, shost->rescan);
+ shost->rescan=1;
+}
+
+/**
+ * scsi_scan_single_target - scan the given SCSI target
+ * @shost: adapter to scan
+ * @chan: channel to scan
+ * @id: target id to scan
+ **/
+void scsi_scan_single_target(struct Scsi_Host *shost,
+ unsigned int chan, unsigned int id)
+{
+ scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
}
void scsi_forget_host(struct Scsi_Host *shost)
diff -uNr linux-2.6.10-rc2/drivers/scsi/scsi_syms.c linux-2.6.10-rc2.patch/drivers/scsi/scsi_syms.c
--- linux-2.6.10-rc2/drivers/scsi/scsi_syms.c 2004-11-17 13:58:40.390674936 -0500
+++ linux-2.6.10-rc2.patch/drivers/scsi/scsi_syms.c 2004-11-17 13:58:40.398673720 -0500
@@ -27,6 +27,7 @@
EXPORT_SYMBOL(scsi_host_alloc);
EXPORT_SYMBOL(scsi_add_host);
EXPORT_SYMBOL(scsi_scan_host);
+EXPORT_SYMBOL(scsi_scan_single_target);
EXPORT_SYMBOL(scsi_remove_host);
EXPORT_SYMBOL(scsi_host_get);
EXPORT_SYMBOL(scsi_host_put);
diff -uNr linux-2.6.10-rc2/include/scsi/scsi_host.h linux-2.6.10-rc2.patch/include/scsi/scsi_host.h
--- linux-2.6.10-rc2/include/scsi/scsi_host.h 2004-11-17 13:58:40.353680560 -0500
+++ linux-2.6.10-rc2.patch/include/scsi/scsi_host.h 2004-11-17 13:58:40.361679344 -0500
@@ -454,6 +454,7 @@
unsigned unchecked_isa_dma:1;
unsigned use_clustering:1;
unsigned use_blk_tcq:1;
+ unsigned rescan:1;
/*
* Host has requested that no further requests come through for the
@@ -527,6 +528,8 @@
extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int);
extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *);
extern void scsi_scan_host(struct Scsi_Host *);
+extern void scsi_scan_single_target(struct Scsi_Host *, unsigned int,
+ unsigned int);
extern void scsi_remove_host(struct Scsi_Host *);
extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *);
extern void scsi_host_put(struct Scsi_Host *t);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-17 19:03 James.Smart
@ 2004-11-18 10:46 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2004-11-18 10:46 UTC (permalink / raw)
To: James.Smart; +Cc: linux-scsi
On Wed, Nov 17, 2004 at 02:03:01PM -0500, James.Smart@Emulex.Com wrote:
> This patch contains the following 2 modifications:
>
> - Allows scsi_scan_host() to be called at times other than just first attachment.
I'm not too happy about that, and we had that discussion already when
discussing the aacraid dynamic container addition / removal.
> - Provides a new interface to scan a single target entity.
>
> This allows our LLDD to automatically detect new device additions after a cable/fabric change, or upon insertion of a new FC device.
>
> Note: We opted for a "scan target" interface as, on large configurations, scanning everything on the link via scsi_scan_host() was overkill.
>
> scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
> - SCAN_WILD_CARD, 0);
> + SCAN_WILD_CARD, shost->rescan);
> + shost->rescan=1;
this is missing whitespaces. Also ->rescan is not used anywhere.
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-18 13:36 James.Smart
2004-11-18 14:23 ` Christoph Hellwig
0 siblings, 1 reply; 14+ messages in thread
From: James.Smart @ 2004-11-18 13:36 UTC (permalink / raw)
To: hch; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]
> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org]
> > - Allows scsi_scan_host() to be called at times other than
> just first attachment.
>
> I'm not too happy about that, and we had that discussion already when
> discussing the aacraid dynamic container addition / removal.
Hmmm. I found the following discussion in Aug 2003 (http://marc.theaimsgroup.com/?l=linux-scsi&m=106183721811209&w=2). The argument is about exporting scsi_scan_host_selected() and alternatively using scsi_rescan_device().
This patch does not export scsi_scan_host_selected() - it simply updates the internals of scsi_scan_host() so the rescan flag is not always hardcoded to 0 - which would always take the "optimized" path for scanning the first time, making it callable only upon first attachment.
Given that scsi_rescan_device() works on a lun level, the lldd has no notion of what luns exist on the target, nor the appropriate scan logic for luns on a target (blacklist, etc), scsi_rescan_device() isn't appropriate to use (and would be very cumbersome).
If there's a different set of arguments, let me know.
> > - Provides a new interface to scan a single target entity.
> >
> > This allows our LLDD to automatically detect new device
> additions after a cable/fabric change, or upon insertion of a
> new FC device.
> >
> > Note: We opted for a "scan target" interface as, on large
> configurations, scanning everything on the link via
> scsi_scan_host() was overkill.
> >
>
> > scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
> > - SCAN_WILD_CARD, 0);
> > + SCAN_WILD_CARD, shost->rescan);
> > + shost->rescan=1;
>
> this is missing whitespaces. Also ->rescan is not used anywhere.
?? Must have been late (or early). The diff itself clearly shows the use of ->rescan in the call to scsi_scan_host_selected(). Missing whitespace ?? The only reference I can figure out is if the tabs were removed, and if so, it was an inadvertant paste into the mail message.
In further consideration, I should have set the rescan flag prior to the call so that a second call while the first is outstanding will not encounter an issue. Attached is an update.
-- James S
[-- Attachment #2: scan.patch --]
[-- Type: application/octet-stream, Size: 2381 bytes --]
diff -uNr linux-2.6.10-rc2/drivers/scsi/scsi_scan.c linux-2.6.10-rc2.patch/drivers/scsi/scsi_scan.c
--- linux-2.6.10-rc2/drivers/scsi/scsi_scan.c 2004-11-17 13:58:40.000000000 -0500
+++ linux-2.6.10-rc2.patch/drivers/scsi/scsi_scan.c 2004-11-18 08:18:18.926352264 -0500
@@ -1222,8 +1222,22 @@
**/
void scsi_scan_host(struct Scsi_Host *shost)
{
+ int rescan = shost->rescan;
+ shost->rescan=1;
scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
- SCAN_WILD_CARD, 0);
+ SCAN_WILD_CARD, rescan);
+}
+
+/**
+ * scsi_scan_single_target - scan the given SCSI target
+ * @shost: adapter to scan
+ * @chan: channel to scan
+ * @id: target id to scan
+ **/
+void scsi_scan_single_target(struct Scsi_Host *shost,
+ unsigned int chan, unsigned int id)
+{
+ scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
}
void scsi_forget_host(struct Scsi_Host *shost)
diff -uNr linux-2.6.10-rc2/drivers/scsi/scsi_syms.c linux-2.6.10-rc2.patch/drivers/scsi/scsi_syms.c
--- linux-2.6.10-rc2/drivers/scsi/scsi_syms.c 2004-11-17 13:58:40.000000000 -0500
+++ linux-2.6.10-rc2.patch/drivers/scsi/scsi_syms.c 2004-11-17 13:58:40.000000000 -0500
@@ -27,6 +27,7 @@
EXPORT_SYMBOL(scsi_host_alloc);
EXPORT_SYMBOL(scsi_add_host);
EXPORT_SYMBOL(scsi_scan_host);
+EXPORT_SYMBOL(scsi_scan_single_target);
EXPORT_SYMBOL(scsi_remove_host);
EXPORT_SYMBOL(scsi_host_get);
EXPORT_SYMBOL(scsi_host_put);
diff -uNr linux-2.6.10-rc2/include/scsi/scsi_host.h linux-2.6.10-rc2.patch/include/scsi/scsi_host.h
--- linux-2.6.10-rc2/include/scsi/scsi_host.h 2004-11-17 13:58:40.000000000 -0500
+++ linux-2.6.10-rc2.patch/include/scsi/scsi_host.h 2004-11-17 13:58:40.000000000 -0500
@@ -454,6 +454,7 @@
unsigned unchecked_isa_dma:1;
unsigned use_clustering:1;
unsigned use_blk_tcq:1;
+ unsigned rescan:1;
/*
* Host has requested that no further requests come through for the
@@ -527,6 +528,8 @@
extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int);
extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *);
extern void scsi_scan_host(struct Scsi_Host *);
+extern void scsi_scan_single_target(struct Scsi_Host *, unsigned int,
+ unsigned int);
extern void scsi_remove_host(struct Scsi_Host *);
extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *);
extern void scsi_host_put(struct Scsi_Host *t);
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-18 14:11 Salyzyn, Mark
2004-11-18 14:26 ` Christoph Hellwig
0 siblings, 1 reply; 14+ messages in thread
From: Salyzyn, Mark @ 2004-11-18 14:11 UTC (permalink / raw)
To: Christoph Hellwig, James.Smart; +Cc: linux-scsi, Mark Haverkamp
The add/delete/change device interfaces are still not exported, and I am
still getting customer pressure to provide a means to bring arrays
on-line or off-line without needing the users themselves to talk to the
dangerous /proc/scsi/scsi node or requiring an intervening reboot. RAID
and Storage networks require this functionality.
Christoph, we need closure on this now to allow LLDD to provide Plug and
Play notifications. MarkH as submitted patches to expose these
(scsi_rescan_device & scsi_scan_host_selected) interfaces and they are
still hidden.
Sincerely -- Mark Salyzyn
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Christoph Hellwig
Sent: Thursday, November 18, 2004 5:46 AM
To: James.Smart@Emulex.Com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] LLDD dynamic scan aids
On Wed, Nov 17, 2004 at 02:03:01PM -0500, James.Smart@Emulex.Com wrote:
> This patch contains the following 2 modifications:
>
> - Allows scsi_scan_host() to be called at times other than just first
attachment.
I'm not too happy about that, and we had that discussion already when
discussing the aacraid dynamic container addition / removal.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-18 13:36 James.Smart
@ 2004-11-18 14:23 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2004-11-18 14:23 UTC (permalink / raw)
To: James.Smart; +Cc: linux-scsi
> Hmmm. I found the following discussion in Aug 2003 (http://marc.theaimsgroup.com/?l=linux-scsi&m=106183721811209&w=2). The argument is about exporting scsi_scan_host_selected() and alternatively using scsi_rescan_device().
>
> This patch does not export scsi_scan_host_selected() - it simply updates the internals of scsi_scan_host() so the rescan flag is not always hardcoded to 0
which is about the same as a call to scsi_scan_host_selected with wildcards
for channel/target/lun.
> Given that scsi_rescan_device() works on a lun level, the lldd has no notion of what luns exist on the target, nor the appropriate scan logic for luns on a target (blacklist, etc), scsi_rescan_device() isn't appropriate to use (and would be very cumbersome).
IIRC FC defines notification of target discovery/removal, so that sounds
like the right level to probe to me, as the second hunk of your patch does.
What do you need the host level probe for?
> > > scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
> > > - SCAN_WILD_CARD, 0);
> > > + SCAN_WILD_CARD, shost->rescan);
> > > + shost->rescan=1;
> >
> > this is missing whitespaces. Also ->rescan is not used anywhere.
>
> ?? Must have been late (or early). The diff itself clearly shows the use of ->rescan in the call to scsi_scan_host_selected().
Yes, you're right.
> Missing whitespace ?? The only reference I can figure out is if the tabs were removed, and if so, it was an inadvertant paste into the mail message.
before and after the "=".
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-18 14:11 Salyzyn, Mark
@ 2004-11-18 14:26 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2004-11-18 14:26 UTC (permalink / raw)
To: Salyzyn, Mark; +Cc: James.Smart, linux-scsi, Mark Haverkamp
On Thu, Nov 18, 2004 at 09:11:55AM -0500, Salyzyn, Mark wrote:
> The add/delete/change device interfaces are still not exported, and I am
> still getting customer pressure to provide a means to bring arrays
> on-line or off-line without needing the users themselves to talk to the
> dangerous /proc/scsi/scsi node or requiring an intervening reboot. RAID
> and Storage networks require this functionality.
>
> Christoph, we need closure on this now to allow LLDD to provide Plug and
> Play notifications. MarkH as submitted patches to expose these
> (scsi_rescan_device & scsi_scan_host_selected) interfaces and they are
> still hidden.
And the rationale is the same as before, we really don't want to go wild
and do a full bus scan if we know that only a single target or lun
(or a container that the driver maps to scsi datastructures in the aacraid
case) has been added/removed.
What patch from MarkH did you refer to?
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-18 14:32 Salyzyn, Mark
2004-11-18 14:36 ` Christoph Hellwig
0 siblings, 1 reply; 14+ messages in thread
From: Salyzyn, Mark @ 2004-11-18 14:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: James.Smart, linux-scsi, Mark Haverkamp
But scsi_rescan_device and scsi_scan_host_selected both target specific
ids though? As long as we stay away from the wildcards for
scsi_scan_host_selected, or am I mistaken?
MarkH, can you reissue the patch?
Sincerely -- Mark Salyzyn
-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Thursday, November 18, 2004 9:26 AM
To: Salyzyn, Mark
Cc: James.Smart@Emulex.Com; linux-scsi@vger.kernel.org; Mark Haverkamp
Subject: Re: [PATCH] LLDD dynamic scan aids
On Thu, Nov 18, 2004 at 09:11:55AM -0500, Salyzyn, Mark wrote:
> The add/delete/change device interfaces are still not exported, and I
am
> still getting customer pressure to provide a means to bring arrays
> on-line or off-line without needing the users themselves to talk to
the
> dangerous /proc/scsi/scsi node or requiring an intervening reboot.
RAID
> and Storage networks require this functionality.
>
> Christoph, we need closure on this now to allow LLDD to provide Plug
and
> Play notifications. MarkH as submitted patches to expose these
> (scsi_rescan_device & scsi_scan_host_selected) interfaces and they are
> still hidden.
And the rationale is the same as before, we really don't want to go wild
and do a full bus scan if we know that only a single target or lun
(or a container that the driver maps to scsi datastructures in the
aacraid
case) has been added/removed.
What patch from MarkH did you refer to?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-18 14:32 [PATCH] LLDD dynamic scan aids Salyzyn, Mark
@ 2004-11-18 14:36 ` Christoph Hellwig
2004-11-18 15:48 ` Patrick Mansfield
0 siblings, 1 reply; 14+ messages in thread
From: Christoph Hellwig @ 2004-11-18 14:36 UTC (permalink / raw)
To: Salyzyn, Mark; +Cc: James.Smart, linux-scsi, Mark Haverkamp
On Thu, Nov 18, 2004 at 09:32:09AM -0500, Salyzyn, Mark wrote:
> But scsi_rescan_device and scsi_scan_host_selected both target specific
> ids though? As long as we stay away from the wildcards for
> scsi_scan_host_selected, or am I mistaken?
scsi_rescan_device should be exported. For the target scan something
like the second hunk of James' patch looks good to me.
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-18 15:07 Salyzyn, Mark
0 siblings, 0 replies; 14+ messages in thread
From: Salyzyn, Mark @ 2004-11-18 15:07 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: James.Smart, linux-scsi, Mark Haverkamp
Agreed!!
Add in EXPORT_SYMBOL(scsi_rescan_device) and the transformation will now
be complete :-)
Sincerely -- Mark Salyzyn
-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Thursday, November 18, 2004 9:37 AM
To: Salyzyn, Mark
Cc: James.Smart@Emulex.Com; linux-scsi@vger.kernel.org; Mark Haverkamp
Subject: Re: [PATCH] LLDD dynamic scan aids
On Thu, Nov 18, 2004 at 09:32:09AM -0500, Salyzyn, Mark wrote:
> But scsi_rescan_device and scsi_scan_host_selected both target
specific
> ids though? As long as we stay away from the wildcards for
> scsi_scan_host_selected, or am I mistaken?
scsi_rescan_device should be exported. For the target scan something
like the second hunk of James' patch looks good to me.
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-18 15:32 James.Smart
2004-11-18 15:43 ` Christoph Hellwig
0 siblings, 1 reply; 14+ messages in thread
From: James.Smart @ 2004-11-18 15:32 UTC (permalink / raw)
To: hch; +Cc: linux-scsi
> What do you need the host level probe for?
Well my argument is basically efficiency - 1 scan on everything vs the driver managing (what could be 100+) events to scan individual targets. However I agree that if you have the logic to scan on a per-port basis, you really don't need the host-level probe. I'd still lean toward the host-level fix anyway, as it is an exported symbol, and it's a very subtle nuance that it can't be called multiple times.
I want to check something: If you truly were probing on a per-port basis, there's no need to ever call scsi_scan_host(), which means there potentially would never be a scan where rescan=0, or that sequential probing of channels/targets occur. Is this an issue ?
-- James
Note: I'll update the patch pending the comments to this email. It'll include the whitespace, any negotiated change, as well as the EXPORT_SYMBOL(scsi_rescan_device) addition for Mark Salyzyn.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-18 15:32 James.Smart
@ 2004-11-18 15:43 ` Christoph Hellwig
0 siblings, 0 replies; 14+ messages in thread
From: Christoph Hellwig @ 2004-11-18 15:43 UTC (permalink / raw)
To: James.Smart; +Cc: linux-scsi
> I want to check something: If you truly were probing on a per-port basis, there's no need to ever call scsi_scan_host(), which means there potentially would never be a scan where rescan=0, or that sequential probing of channels/targets occur. Is this an issue ?
Don't think so. Maybe we should allow a !rescan variant of the per-target
probe if you really see performance problems without, but not calling
scsi_scan_host is just fine. In fact that's the reason why I separated
it out from scsi_add_host. The sequential bus scan is fundamentally a SPI
thing and other transports are probably better off not using it at all, e.g.
IEEE1394 SBP2 and iscsi already don't call it at all.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] LLDD dynamic scan aids
2004-11-18 14:36 ` Christoph Hellwig
@ 2004-11-18 15:48 ` Patrick Mansfield
0 siblings, 0 replies; 14+ messages in thread
From: Patrick Mansfield @ 2004-11-18 15:48 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Salyzyn, Mark, James.Smart, linux-scsi, Mark Haverkamp
On Thu, Nov 18, 2004 at 02:36:44PM +0000, Christoph Hellwig wrote:
> On Thu, Nov 18, 2004 at 09:32:09AM -0500, Salyzyn, Mark wrote:
> > But scsi_rescan_device and scsi_scan_host_selected both target specific
> > ids though? As long as we stay away from the wildcards for
> > scsi_scan_host_selected, or am I mistaken?
>
> scsi_rescan_device should be exported. For the target scan something
> like the second hunk of James' patch looks good to me.
Why not export scsi_scan_host_selected (and SCAN_WILD_CARD)? If a driver
used it wrong then change the driver.
Suppose a driver wants to scan a given channel. (Would one ever want to
scan for a particular a LUN? I can't think of a reason).
If the driver wants to rescan the host (it knows it it has already
called any scsi scan functions), it would call:
scsi_scan_host_selected(shost, SCAN_WILD_CARD,
SCAN_WILD_CARD, SCAN_WILD_CARD, 1);
And new target scan:
scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 0);
Target rescan:
scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
Instead of any shost->rescan logic.
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-19 21:07 Mukker, Atul
0 siblings, 0 replies; 14+ messages in thread
From: Mukker, Atul @ 2004-11-19 21:07 UTC (permalink / raw)
To: 'Patrick Mansfield', 'Christoph Hellwig'
Cc: 'Salyzyn, Mark', 'James.Smart@Emulex.Com',
'linux-scsi@vger.kernel.org', 'Mark Haverkamp'
Since it is widely accepted that bringing new devices online, have an
ability to dynamically mark them offline, report changes in size etc, are
crucial for high performance computing solutions, it can only be good if the
most of the situations are enumerated. After which the possible and
optimized solutions are laid out.
The following conditions are the minimum IMO
1. Few new devices are added (for example some new raid volumes are
created by configuration program)
a. If the LLDD 'knows' the bus, target, and lun, it may call
scsi_add_device() for each of new entries
b. Do a scsi_scan_host_selected(shost, chan, id,
SCAN_WILD_CARD, 0) or scsi_scan_host_selected(shost, chan, SCAN_WILD_CARD,
SCAN_WILD_CARD, 0) as appropriate
c. Applications use proc/sysfs to update
2. Few devices are deleted
a. LLDD call scsi_remove_device() for each of the deleted
volume.
b. ???
c. Applications use proc/sysfs to update
3. Many new devices are added (for example new configuration is
created)
a. If the LLDD 'knows' the bus, target, and lun, it may call
scsi_add_device() for each of new entries
b. Do a scsi_scan_host_selected(shost, SCAN_WILD_CARD,
SCAN_WILD_CARD, SCAN_WILD_CARD, 0)
c. Applications use proc/sysfs to update
4. Many devices are removed(for example configuration is cleared)
a. LLDD call scsi_remove_device() for each of the deleted
volume.
b. Do a scsi_scan_host_selected(shost, SCAN_WILD_CARD,
SCAN_WILD_CARD, SCAN_WILD_CARD, 1)???
c. Applications use proc/sysfs to update
5. Sizes of the existing volumes changed.
a. scsi_rescan_device()
b. ???
c. ???
Best Regards
-Atul Mukker
Architect, Drivers and BIOS
LSI Logic Corporation
> -----Original Message-----
> From: Patrick Mansfield [mailto:patmans@us.ibm.com]
> Sent: Thursday, November 18, 2004 10:48 AM
> To: Christoph Hellwig
> Cc: Salyzyn, Mark; James.Smart@Emulex.Com;
> linux-scsi@vger.kernel.org; Mark Haverkamp
> Subject: Re: [PATCH] LLDD dynamic scan aids
>
> On Thu, Nov 18, 2004 at 02:36:44PM +0000, Christoph Hellwig wrote:
> > On Thu, Nov 18, 2004 at 09:32:09AM -0500, Salyzyn, Mark wrote:
> > > But scsi_rescan_device and scsi_scan_host_selected both target
> > > specific ids though? As long as we stay away from the
> wildcards for
> > > scsi_scan_host_selected, or am I mistaken?
> >
> > scsi_rescan_device should be exported. For the target scan
> something
> > like the second hunk of James' patch looks good to me.
>
> Why not export scsi_scan_host_selected (and SCAN_WILD_CARD)?
> If a driver used it wrong then change the driver.
>
> Suppose a driver wants to scan a given channel. (Would one
> ever want to scan for a particular a LUN? I can't think of a reason).
>
> If the driver wants to rescan the host (it knows it it has
> already called any scsi scan functions), it would call:
>
> scsi_scan_host_selected(shost, SCAN_WILD_CARD,
> SCAN_WILD_CARD, SCAN_WILD_CARD, 1);
>
> And new target scan:
>
> scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 0);
>
> Target rescan:
>
> scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
>
> Instead of any shost->rescan logic.
>
> -- Patrick Mansfield
> -
> 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] 14+ messages in thread
* RE: [PATCH] LLDD dynamic scan aids
@ 2004-11-29 17:28 Mukker, Atul
0 siblings, 0 replies; 14+ messages in thread
From: Mukker, Atul @ 2004-11-29 17:28 UTC (permalink / raw)
To: Mukker, Atul, 'Patrick Mansfield',
'Christoph Hellwig'
Cc: 'Salyzyn, Mark', 'James.Smart@Emulex.Com',
'linux-scsi@vger.kernel.org', 'Mark Haverkamp'
This thread seems to have died suddenly :-(
Are there any more suggestions?
Thanks
-Atul
> -----Original Message-----
> From: Mukker, Atul [mailto:Atulm@lsil.com]
> Sent: Friday, November 19, 2004 4:07 PM
> To: 'Patrick Mansfield'; 'Christoph Hellwig'
> Cc: 'Salyzyn, Mark'; 'James.Smart@Emulex.Com';
> 'linux-scsi@vger.kernel.org'; 'Mark Haverkamp'
> Subject: RE: [PATCH] LLDD dynamic scan aids
>
> Since it is widely accepted that bringing new devices online,
> have an ability to dynamically mark them offline, report
> changes in size etc, are crucial for high performance
> computing solutions, it can only be good if the most of the
> situations are enumerated. After which the possible and
> optimized solutions are laid out.
>
> The following conditions are the minimum IMO
>
> 1. Few new devices are added (for example some new raid volumes are
> created by configuration program)
>
> a. If the LLDD 'knows' the bus, target, and lun,
> it may call
> scsi_add_device() for each of new entries
> b. Do a scsi_scan_host_selected(shost, chan, id,
> SCAN_WILD_CARD, 0) or scsi_scan_host_selected(shost, chan,
> SCAN_WILD_CARD, SCAN_WILD_CARD, 0) as appropriate
> c. Applications use proc/sysfs to update
>
>
> 2. Few devices are deleted
>
> a. LLDD call scsi_remove_device() for each of the deleted
> volume.
> b. ???
> c. Applications use proc/sysfs to update
>
>
> 3. Many new devices are added (for example new configuration is
> created)
>
> a. If the LLDD 'knows' the bus, target, and lun,
> it may call
> scsi_add_device() for each of new entries
> b. Do a scsi_scan_host_selected(shost, SCAN_WILD_CARD,
> SCAN_WILD_CARD, SCAN_WILD_CARD, 0)
> c. Applications use proc/sysfs to update
>
>
> 4. Many devices are removed(for example configuration is cleared)
>
> a. LLDD call scsi_remove_device() for each of the deleted
> volume.
> b. Do a scsi_scan_host_selected(shost, SCAN_WILD_CARD,
> SCAN_WILD_CARD, SCAN_WILD_CARD, 1)???
> c. Applications use proc/sysfs to update
>
>
> 5. Sizes of the existing volumes changed.
>
> a. scsi_rescan_device()
> b. ???
> c. ???
>
>
> Best Regards
> -Atul Mukker
> Architect, Drivers and BIOS
> LSI Logic Corporation
>
> > -----Original Message-----
> > From: Patrick Mansfield [mailto:patmans@us.ibm.com]
> > Sent: Thursday, November 18, 2004 10:48 AM
> > To: Christoph Hellwig
> > Cc: Salyzyn, Mark; James.Smart@Emulex.Com;
> linux-scsi@vger.kernel.org;
> > Mark Haverkamp
> > Subject: Re: [PATCH] LLDD dynamic scan aids
> >
> > On Thu, Nov 18, 2004 at 02:36:44PM +0000, Christoph Hellwig wrote:
> > > On Thu, Nov 18, 2004 at 09:32:09AM -0500, Salyzyn, Mark wrote:
> > > > But scsi_rescan_device and scsi_scan_host_selected both target
> > > > specific ids though? As long as we stay away from the
> > wildcards for
> > > > scsi_scan_host_selected, or am I mistaken?
> > >
> > > scsi_rescan_device should be exported. For the target scan
> > something
> > > like the second hunk of James' patch looks good to me.
> >
> > Why not export scsi_scan_host_selected (and SCAN_WILD_CARD)?
> > If a driver used it wrong then change the driver.
> >
> > Suppose a driver wants to scan a given channel. (Would one
> ever want
> > to scan for a particular a LUN? I can't think of a reason).
> >
> > If the driver wants to rescan the host (it knows it it has already
> > called any scsi scan functions), it would call:
> >
> > scsi_scan_host_selected(shost, SCAN_WILD_CARD,
> > SCAN_WILD_CARD, SCAN_WILD_CARD, 1);
> >
> > And new target scan:
> >
> > scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 0);
> >
> > Target rescan:
> >
> > scsi_scan_host_selected(shost, chan, id, SCAN_WILD_CARD, 1);
> >
> > Instead of any shost->rescan logic.
> >
> > -- Patrick Mansfield
> > -
> > 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
> >
> -
> 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] 14+ messages in thread
end of thread, other threads:[~2004-11-29 17:29 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 14:32 [PATCH] LLDD dynamic scan aids Salyzyn, Mark
2004-11-18 14:36 ` Christoph Hellwig
2004-11-18 15:48 ` Patrick Mansfield
-- strict thread matches above, loose matches on Subject: below --
2004-11-29 17:28 Mukker, Atul
2004-11-19 21:07 Mukker, Atul
2004-11-18 15:32 James.Smart
2004-11-18 15:43 ` Christoph Hellwig
2004-11-18 15:07 Salyzyn, Mark
2004-11-18 14:11 Salyzyn, Mark
2004-11-18 14:26 ` Christoph Hellwig
2004-11-18 13:36 James.Smart
2004-11-18 14:23 ` Christoph Hellwig
2004-11-17 19:03 James.Smart
2004-11-18 10:46 ` Christoph Hellwig
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).