[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>
This commit is contained in:
committed by
James Bottomley
parent
ae36764a23
commit
0f29b966d6
@ -195,6 +195,7 @@ struct fc_rport { /* aka fc_starget_attrs */
|
||||
u32 roles;
|
||||
enum fc_port_state port_state; /* Will only be ONLINE or UNKNOWN */
|
||||
u32 scsi_target_id;
|
||||
u32 fast_io_fail_tmo;
|
||||
|
||||
/* exported data */
|
||||
void *dd_data; /* Used for driver-specific storage */
|
||||
@ -207,6 +208,7 @@ struct fc_rport { /* aka fc_starget_attrs */
|
||||
struct device dev;
|
||||
struct work_struct dev_loss_work;
|
||||
struct work_struct scan_work;
|
||||
struct work_struct fail_io_work;
|
||||
struct work_struct stgt_delete_work;
|
||||
struct work_struct rport_delete_work;
|
||||
} __attribute__((aligned(sizeof(unsigned long))));
|
||||
@ -445,6 +447,9 @@ struct fc_function_template {
|
||||
|
||||
int (*issue_fc_host_lip)(struct Scsi_Host *);
|
||||
|
||||
void (*dev_loss_tmo_callbk)(struct fc_rport *);
|
||||
void (*terminate_rport_io)(struct fc_rport *);
|
||||
|
||||
/* allocation lengths for host-specific data */
|
||||
u32 dd_fcrport_size;
|
||||
|
||||
|
Reference in New Issue
Block a user