1FC_REMOTE_PORT_DELET(9) SCSI mid layer FC_REMOTE_PORT_DELET(9)
2
3
4
6 fc_remote_port_delete - notifies the fc transport that a remote port is
7 no longer in existence.
8
10 void fc_remote_port_delete(struct fc_rport * rport);
11
13 rport
14 The remote port that no longer exists
15
17 The LLDD calls this routine to notify the transport that a remote port
18 is no longer part of the topology. Note: Although a port may no longer
19 be part of the topology, it may persist in the remote ports displayed
20 by the fc_host. We do this under 2 conditions: 1) If the port was a
21 scsi target, we delay its deletion by “blocking” it. This allows the
22 port to temporarily disappear, then reappear without disrupting the
23 SCSI device tree attached to it. During the “blocked” period the port
24 will still exist. 2) If the port was a scsi target and disappears for
25 longer than we expect, we'll delete the port and the tear down the SCSI
26 device tree attached to it. However, we want to semi-persist the target
27 id assigned to that port if it eventually does exist. The port
28 structure will remain (although with minimal information) so that the
29 target id bindings remails.
30
31 If the remote port is not an FCP Target, it will be fully torn down and
32 deallocated, including the fc_remote_port class device.
33
34 If the remote port is an FCP Target, the port will be placed in a
35 temporary blocked state. From the LLDD's perspective, the rport no
36 longer exists. From the SCSI midlayer's perspective, the SCSI target
37 exists, but all sdevs on it are blocked from further I/O. The following
38 is then expected.
39
40 If the remote port does not return (signaled by a LLDD call to
41 fc_remote_port_add) within the dev_loss_tmo timeout, then the scsi
42 target is removed - killing all outstanding i/o and removing the scsi
43 devices attached ot it. The port structure will be marked Not Present
44 and be partially cleared, leaving only enough information to recognize
45 the remote port relative to the scsi target id binding if it later
46 appears. The port will remain as long as there is a valid binding (e.g.
47 until the user changes the binding type or unloads the scsi host with
48 the binding).
49
50 If the remote port returns within the dev_loss_tmo value (and matches
51 according to the target id binding type), the port structure will be
52 reused. If it is no longer a SCSI target, the target will be torn down.
53 If it continues to be a SCSI target, then the target will be unblocked
54 (allowing i/o to be resumed), and a scan will be activated to ensure
55 that all luns are detected.
56
57 Called from normal process context only - cannot be called from
58 interrupt.
59
61 This routine assumes no locks are held on entry.
62
64 James Bottomley <James.Bottomley@hansenpartnership.com>
65 Author.
66
67 Rob Landley <rob@landley.net>
68 Author.
69
71Kernel Hackers Manual 3.10 June 2019 FC_REMOTE_PORT_DELET(9)