diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-08-18 17:33:29 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-09-04 22:22:05 -0400 |
commit | 0f29b966d60e9a4f5ecff9f3832257b38aea4f13 (patch) | |
tree | 0b14cbcdf74aee4676c49353f816ae5f98c504ee /include/scsi | |
parent | ae36764a230ff6a278ed93735acf5fcda08f2786 (diff) |
[SCSI] FC transport: Add dev_loss_tmo callbacks, and new fast_io_fail_tmo w/ callback
This patch adds the following functionality to the FC transport:
- dev_loss_tmo LLDD callback :
Called to essentially confirm the deletion of an rport. Thus, it is
called whenever the dev_loss_tmo fires, or when the rport is deleted
due to other circumstances (module unload, etc). It is expected that
the callback will initiate the termination of any outstanding i/o on
the rport.
- fast_io_fail_tmo and LLD callback:
There are some cases where it may take a long while to truly determine
device loss, but the system is in a multipathing configuration that if
the i/o was failed quickly (faster than dev_loss_tmo), it could be
redirected to a different path and completed sooner.
Many thanks to Mike Reed who cleaned up the initial RFC in support
of this post.
The original RFC is at:
http://marc.theaimsgroup.com/?l=linux-scsi&m=115505981027246&w=2
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 0b11eff989e0..fd352323378b 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -195,6 +195,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
195 | u32 roles; | 195 | u32 roles; |
196 | enum fc_port_state port_state; /* Will only be ONLINE or UNKNOWN */ | 196 | enum fc_port_state port_state; /* Will only be ONLINE or UNKNOWN */ |
197 | u32 scsi_target_id; | 197 | u32 scsi_target_id; |
198 | u32 fast_io_fail_tmo; | ||
198 | 199 | ||
199 | /* exported data */ | 200 | /* exported data */ |
200 | void *dd_data; /* Used for driver-specific storage */ | 201 | void *dd_data; /* Used for driver-specific storage */ |
@@ -207,6 +208,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
207 | struct device dev; | 208 | struct device dev; |
208 | struct work_struct dev_loss_work; | 209 | struct work_struct dev_loss_work; |
209 | struct work_struct scan_work; | 210 | struct work_struct scan_work; |
211 | struct work_struct fail_io_work; | ||
210 | struct work_struct stgt_delete_work; | 212 | struct work_struct stgt_delete_work; |
211 | struct work_struct rport_delete_work; | 213 | struct work_struct rport_delete_work; |
212 | } __attribute__((aligned(sizeof(unsigned long)))); | 214 | } __attribute__((aligned(sizeof(unsigned long)))); |
@@ -445,6 +447,9 @@ struct fc_function_template { | |||
445 | 447 | ||
446 | int (*issue_fc_host_lip)(struct Scsi_Host *); | 448 | int (*issue_fc_host_lip)(struct Scsi_Host *); |
447 | 449 | ||
450 | void (*dev_loss_tmo_callbk)(struct fc_rport *); | ||
451 | void (*terminate_rport_io)(struct fc_rport *); | ||
452 | |||
448 | /* allocation lengths for host-specific data */ | 453 | /* allocation lengths for host-specific data */ |
449 | u32 dd_fcrport_size; | 454 | u32 dd_fcrport_size; |
450 | 455 | ||