SCSI_EH_PREP_CMND(9) SCSI mid layer SCSI_EH_PREP_CMND(9)NAME
scsi_eh_prep_cmnd - Save a scsi command info as part of error recovery
SYNOPSIS
void scsi_eh_prep_cmnd(struct scsi_cmnd * scmd, struct scsi_eh_save * ses, unsigned char * cmnd, int cmnd_size, unsigned sense_bytes);
ARGUMENTS
scmd
SCSI command structure to hijack
ses
structure to save restore information
cmnd
CDB to send. Can be NULL if no new cmnd is needed
cmnd_size
size in bytes of cmnd (must be <= BLK_MAX_CDB)
sense_bytes
size of sense data to copy. or 0 (if != 0 cmnd is ignored)
DESCRIPTION
This function is used to save a scsi command information before re-execution as part of the error recovery process. If sense_bytes is 0 the
command sent must be one that does not transfer any data. If sense_bytes != 0 cmnd is ignored and this functions sets up a REQUEST_SENSE
command and cmnd buffers to read sense_bytes into scmd->sense_buffer.
AUTHORS
James Bottomley <James.Bottomley@hansenpartnership.com>
Author.
Rob Landley <rob@landley.net>
Author.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 SCSI_EH_PREP_CMND(9)
Check Out this Related Man Page
FC_REMOTE_PORT_DELET(9) SCSI mid layer FC_REMOTE_PORT_DELET(9)NAME
fc_remote_port_delete - notifies the fc transport that a remote port is no longer in existence.
SYNOPSIS
void fc_remote_port_delete(struct fc_rport * rport);
ARGUMENTS
rport
The remote port that no longer exists
DESCRIPTION
The LLDD calls this routine to notify the transport that a remote port is no longer part of the topology. Note: Although a port may no
longer be part of the topology, it may persist in the remote ports displayed by the fc_host. We do this under 2 conditions: 1) If the port
was a scsi target, we delay its deletion by "blocking" it. This allows the port to temporarily disappear, then reappear without disrupting
the SCSI device tree attached to it. During the "blocked" period the port will still exist. 2) If the port was a scsi target and disappears
for longer than we expect, we'll delete the port and the tear down the SCSI device tree attached to it. However, we want to semi-persist
the target id assigned to that port if it eventually does exist. The port structure will remain (although with minimal information) so that
the target id bindings remails.
If the remote port is not an FCP Target, it will be fully torn down and deallocated, including the fc_remote_port class device.
If the remote port is an FCP Target, the port will be placed in a temporary blocked state. From the LLDD's perspective, the rport no longer
exists. From the SCSI midlayer's perspective, the SCSI target exists, but all sdevs on it are blocked from further I/O. The following is
then expected.
If the remote port does not return (signaled by a LLDD call to fc_remote_port_add) within the dev_loss_tmo timeout, then the scsi target is
removed - killing all outstanding i/o and removing the scsi devices attached ot it. The port structure will be marked Not Present and be
partially cleared, leaving only enough information to recognize the remote port relative to the scsi target id binding if it later appears.
The port will remain as long as there is a valid binding (e.g. until the user changes the binding type or unloads the scsi host with the
binding).
If the remote port returns within the dev_loss_tmo value (and matches according to the target id binding type), the port structure will be
reused. If it is no longer a SCSI target, the target will be torn down. If it continues to be a SCSI target, then the target will be
unblocked (allowing i/o to be resumed), and a scan will be activated to ensure that all luns are detected.
Called from normal process context only - cannot be called from interrupt.
NOTES
This routine assumes no locks are held on entry.
AUTHORS
James Bottomley <James.Bottomley@hansenpartnership.com>
Author.
Rob Landley <rob@landley.net>
Author.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 FC_REMOTE_PORT_DELET(9)