The following series changes the way remote ports are handled in libfc.
Before this series, the transport struct fc_rport is allocated with
space for struct fc_rport_libfc_priv, and fc_rport is the primary
interface to the remote port, target discovery, and FCP components.
Since fc_remote_port_add() could not be called before the port_name
and node_name were known, we created "rogue" rports in fc_rport.c and
later converted them to "real" transport rports.
This was racy, however, because while waiting for the real rport to
be created, we could receive requests from the peer or an RSCN
concerning the "rogue" rport and it is difficult to analyze and resolve
all of the state-related issues.
After this series, struct fc_rport_libfc_priv is sill allocated with
the real rport for use in FCP, but the remote port and target discovery
components will use a new separately-allocated struct fc_rport_priv.
This is partly in preparation for more changes to the discovery
and remote port components.
v3 note: This supercedes the set of 9 submitted on 7/8/09.
The last patch is new, the others are just refreshed for
the latest rebase. These were tested with Chris Leech's
fcoe create/destroy fixes, but don't strictly depend on them.
---
libfc: fix rport event race between READY and LOGO
libfc: don't create dummy (rogue) remote ports
libfc: rename rport event CREATED to READY
libfc: rearrange code in fc_rport_work
libfc: make rport structure optional
libfc: change elsct to use FC_ID instead of rdata
libfc: make fc_rport_priv the primary rport interface.
libfc: fix RPORT_TO_PRIV and PRIV_TO_RPORT() macros.
libfc: change interface for rport_create
libfc: prepare to split off struct fc_rport_priv from fc_rport_libfc_priv
drivers/scsi/libfc/fc_disc.c | 208 +++++---------
drivers/scsi/libfc/fc_elsct.c | 11 -
drivers/scsi/libfc/fc_fcp.c | 2
drivers/scsi/libfc/fc_lport.c | 78 +++--
drivers/scsi/libfc/fc_rport.c | 593 ++++++++++++++++++++---------------------
include/scsi/fc_encode.h | 25 --
include/scsi/libfc.h | 88 +++---
7 files changed, 453 insertions(+), 552 deletions(-)
--
Joe Eykholt
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel