target: Fix APTPL metadata handling for dynamic MappedLUNs
authorNicholas Bellinger <nab@linux-iscsi.org>
Sat, 4 Oct 2014 04:23:15 +0000 (04:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 16:59:57 +0000 (08:59 -0800)
commit44e93420d1acc75d3598da79474f6e1e653b9f8c
tree5e4472f18353b888d102440bae6c8f1e87d2d7c7
parent1ac25b80b8d6ed6e66b913f5864ea9b53161c3d4
target: Fix APTPL metadata handling for dynamic MappedLUNs

commit e24805637d2d270d7975502e9024d473de86afdb upstream.

This patch fixes a bug in handling of SPC-3 PR Activate Persistence
across Target Power Loss (APTPL) logic where re-creation of state for
MappedLUNs from dynamically generated NodeACLs did not occur during
I_T Nexus establishment.

It adds the missing core_scsi3_check_aptpl_registration() call during
core_tpg_check_initiator_node_acl() -> core_tpg_add_node_to_devs() in
order to replay any pre-loaded APTPL metadata state associated with
the newly connected SCSI Initiator Port.

Cc: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_device.c
drivers/target/target_core_pr.c
drivers/target/target_core_pr.h
drivers/target/target_core_tpg.c