summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_pr.c
diff options
context:
space:
mode:
authorNicholas Bellinger2014-10-04 06:23:15 +0200
committerNicholas Bellinger2014-10-04 07:40:19 +0200
commite24805637d2d270d7975502e9024d473de86afdb (patch)
tree36277763794b04de9628d2d51889e6f0b77be26e /drivers/target/target_core_pr.c
parentqla_target: don't delete changed nacls (diff)
downloadkernel-qcow2-linux-e24805637d2d270d7975502e9024d473de86afdb.tar.gz
kernel-qcow2-linux-e24805637d2d270d7975502e9024d473de86afdb.tar.xz
kernel-qcow2-linux-e24805637d2d270d7975502e9024d473de86afdb.zip
target: Fix APTPL metadata handling for dynamic MappedLUNs
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> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_pr.c')
-rw-r--r--drivers/target/target_core_pr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 48a801045176..a06edb59b67f 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -937,10 +937,10 @@ int core_scsi3_check_aptpl_registration(
struct se_device *dev,
struct se_portal_group *tpg,
struct se_lun *lun,
- struct se_lun_acl *lun_acl)
+ struct se_node_acl *nacl,
+ u32 mapped_lun)
{
- struct se_node_acl *nacl = lun_acl->se_lun_nacl;
- struct se_dev_entry *deve = nacl->device_list[lun_acl->mapped_lun];
+ struct se_dev_entry *deve = nacl->device_list[mapped_lun];
if (dev->dev_reservation_flags & DRF_SPC2_RESERVATIONS)
return 0;