]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: zfcp: Move fc_host updates during xport data handling into fenced function
authorBenjamin Block <bblock@linux.ibm.com>
Fri, 8 May 2020 17:23:30 +0000 (19:23 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 May 2020 03:19:48 +0000 (23:19 -0400)
commit8a8d51acc40144256a0692c9f8b6d653076982a7
treeb6c33d6735df1feb850e0450cc16c05aeb244d77
parent5923b06d57b66fd1f37dea6f3ce33e9a8bba5fed
scsi: zfcp: Move fc_host updates during xport data handling into fenced function

When executing exchange port data for a FCP device for the first time, or
after an adapter recovery, we update several properties of the fibre
channel host object which represents 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 port data in the adapter life cycle this
will make the exchange port 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/ae454c2dc6da0b02907c489af91d0b211d331825.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