OSDN Git Service

scsi: zfcp: Move shost updates during xconfig data handling into fenced function
authorBenjamin Block <bblock@linux.ibm.com>
Fri, 8 May 2020 17:23:29 +0000 (19:23 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 May 2020 03:19:47 +0000 (23:19 -0400)
commitbd1684817d7d8d1a3b95a4347166246ad1f7670b
tree06a8429cc5fb8e5e5f66cb844d57d7587e40a0ac
parent978857c7e367d6841f71c4ded5a8c244520f5e22
scsi: zfcp: Move shost updates during xconfig data handling into fenced function

When executing exchange config data for a FCP device for the first time, or
after an adapter recovery, we update several properties of the scsi host or
fibre channel host object that represent that FCP device.

When moving the scsi host object allocation and registration - and thus
also the fibre channel host object allocation - to after the first exchange
config and exchange port data, this is not possible for the former case.

Move all these update into separate, and fenced function that first checks
whether the scsi host object already exists or not, before making the
updates.

During the first ever exchange config data in the adapter life cycle this
will make the exchange config data handler skip over this update step, but
we can repeat it later, after we allocated the scsi host object.

For any further recovery of that adapter the work flow is only changed
slightly because then the scsi host object already exists and we don't free
it until we release the adapter completely at the end of its life cycle.

Link: https://lore.kernel.org/r/5fc3f4d38d4334f7aa595497c6f7865fb1102e0f.1588956679.git.bblock@linux.ibm.com
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_scsi.c