* [PATCH] FC transport: Allow LLDD to disable LUN scanning
@ 2007-08-21 15:37 Christof Schmitt
2007-08-21 15:46 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Christof Schmitt @ 2007-08-21 15:37 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart
From: Christof Schmitt <christof.schmitt@de.ibm.com>
Introduce a flag that allows the SCSI low level device driver to
disable the automatic scanning for LUNs from the FC transport class.
This is for the zfcp device driver that manages the attached units on
its own and does not want to have the automatic discovery of other
LUNs.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/scsi/scsi_transport_fc.c | 4 +++-
include/scsi/scsi_transport_fc.h | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.orig/drivers/scsi/scsi_transport_fc.c
+++ linux-2.6/drivers/scsi/scsi_transport_fc.c
@@ -2988,10 +2988,12 @@ fc_scsi_scan_rport(struct work_struct *w
struct fc_rport *rport =
container_of(work, struct fc_rport, scan_work);
struct Scsi_Host *shost = rport_to_shost(rport);
+ struct fc_internal *i = to_fc_internal(shost->transportt);
unsigned long flags;
if ((rport->port_state == FC_PORTSTATE_ONLINE) &&
- (rport->roles & FC_PORT_ROLE_FCP_TARGET)) {
+ (rport->roles & FC_PORT_ROLE_FCP_TARGET) &&
+ !(i->f->disable_target_scan)) {
scsi_scan_target(&rport->dev, rport->channel,
rport->scsi_target_id, SCAN_WILD_CARD, 1);
}
--- linux-2.6.orig/include/scsi/scsi_transport_fc.h
+++ linux-2.6/include/scsi/scsi_transport_fc.h
@@ -632,6 +632,9 @@ struct fc_function_template {
unsigned long show_host_fabric_name:1;
unsigned long show_host_symbolic_name:1;
unsigned long show_host_system_hostname:1;
+
+ /* The driver can disable the LUN scanning from the FC transport class */
+ unsigned long disable_target_scan:1;
};
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] FC transport: Allow LLDD to disable LUN scanning
2007-08-21 15:37 [PATCH] FC transport: Allow LLDD to disable LUN scanning Christof Schmitt
@ 2007-08-21 15:46 ` Matthew Wilcox
2007-08-22 8:28 ` Christof Schmitt
2007-08-22 8:34 ` Update: " Christof Schmitt
0 siblings, 2 replies; 4+ messages in thread
From: Matthew Wilcox @ 2007-08-21 15:46 UTC (permalink / raw)
To: Christof Schmitt; +Cc: linux-scsi, James Smart
On Tue, Aug 21, 2007 at 05:37:17PM +0200, Christof Schmitt wrote:
> unsigned long show_host_system_hostname:1;
> +
> + /* The driver can disable the LUN scanning from the FC transport class */
> + unsigned long disable_target_scan:1;
> };
The comment exceeds 80 columns. Why have a comment at all, none of the
other fields here do, and it doesn't seem to add anything to me.
--
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] FC transport: Allow LLDD to disable LUN scanning
2007-08-21 15:46 ` Matthew Wilcox
@ 2007-08-22 8:28 ` Christof Schmitt
2007-08-22 8:34 ` Update: " Christof Schmitt
1 sibling, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2007-08-22 8:28 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-scsi, James Smart
On Tue, Aug 21, 2007 at 09:46:34AM -0600, Matthew Wilcox wrote:
> The comment exceeds 80 columns. Why have a comment at all, none of the
> other fields here do, and it doesn't seem to add anything to me.
Agree. I will remove the comment.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Update: [PATCH] FC transport: Allow LLDD to disable LUN scanning
2007-08-21 15:46 ` Matthew Wilcox
2007-08-22 8:28 ` Christof Schmitt
@ 2007-08-22 8:34 ` Christof Schmitt
1 sibling, 0 replies; 4+ messages in thread
From: Christof Schmitt @ 2007-08-22 8:34 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart, Matthew Wilcox
From: Christof Schmitt <christof.schmitt@de.ibm.com>
Introduce a flag that allows the SCSI low level device driver to
disable the automatic scanning for LUNs from the FC transport class.
This is for the zfcp device driver that manages the attached units on
its own and does not want to have the automatic discovery of other
LUNs.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/scsi/scsi_transport_fc.c | 4 +++-
include/scsi/scsi_transport_fc.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
--- linux-2.6.orig/drivers/scsi/scsi_transport_fc.c
+++ linux-2.6/drivers/scsi/scsi_transport_fc.c
@@ -2988,10 +2988,12 @@ fc_scsi_scan_rport(struct work_struct *w
struct fc_rport *rport =
container_of(work, struct fc_rport, scan_work);
struct Scsi_Host *shost = rport_to_shost(rport);
+ struct fc_internal *i = to_fc_internal(shost->transportt);
unsigned long flags;
if ((rport->port_state == FC_PORTSTATE_ONLINE) &&
- (rport->roles & FC_PORT_ROLE_FCP_TARGET)) {
+ (rport->roles & FC_PORT_ROLE_FCP_TARGET) &&
+ !(i->f->disable_target_scan)) {
scsi_scan_target(&rport->dev, rport->channel,
rport->scsi_target_id, SCAN_WILD_CARD, 1);
}
--- linux-2.6.orig/include/scsi/scsi_transport_fc.h
+++ linux-2.6/include/scsi/scsi_transport_fc.h
@@ -632,6 +632,8 @@ struct fc_function_template {
unsigned long show_host_fabric_name:1;
unsigned long show_host_symbolic_name:1;
unsigned long show_host_system_hostname:1;
+
+ unsigned long disable_target_scan:1;
};
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-22 8:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-21 15:37 [PATCH] FC transport: Allow LLDD to disable LUN scanning Christof Schmitt
2007-08-21 15:46 ` Matthew Wilcox
2007-08-22 8:28 ` Christof Schmitt
2007-08-22 8:34 ` Update: " Christof Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox