summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2017-03-01 23:13:24 -0600
committerNicholas Bellinger <nab@linux-iscsi.org>2017-03-18 14:47:25 -0700
commit530c6891b1220cba780b6c18f4691d85a3435080 (patch)
tree26ff2d44658b4dae7d60500e0b79014ec1eaf4a0 /drivers/target/target_core_tpg.c
parent2579325ca0acc598fdf41ba12b2871d3467f28df (diff)
downloadlinux-stable-530c6891b1220cba780b6c18f4691d85a3435080.tar.gz
linux-stable-530c6891b1220cba780b6c18f4691d85a3435080.tar.bz2
linux-stable-530c6891b1220cba780b6c18f4691d85a3435080.zip
target: allow ALUA setup for some passthrough backends
This patch allows passthrough backends to use the core/base LIO ALUA setup and state checks, but still handle the execution of commands. This will allow the target_core_user module to execute STPG and RTPG in userspace, and not have to duplicate the ALUA state checks, path information (needed so we can check if command is executable on specific paths) and setup (rtslib sets/updates the configfs ALUA interface like it does for iblock or file). For STPG, the target_core_user userspace daemon, tcmu-runner will still execute the STPG, and to update the core/base LIO state it will use the existing configfs interface. For RTPG, tcmu-runner will loop over configfs and/or cache the state. Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index c0dbfa016575..6fb191914f45 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -602,7 +602,8 @@ int core_tpg_add_lun(
if (ret)
goto out_kill_ref;
- if (!(dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH) &&
+ if (!(dev->transport->transport_flags &
+ TRANSPORT_FLAG_PASSTHROUGH_ALUA) &&
!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
target_attach_tg_pt_gp(lun, dev->t10_alua.default_tg_pt_gp);