aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-10-10 17:37:16 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-06 23:55:45 -0500
commitc87fbd5656f263f0fc1c37d20f402797c068232e (patch)
treeaf83a409d4ba234cf0f67419e48d5588423d05ad /drivers/target/target_core_device.c
parentd977f4377fbc396b888e12fdb3b13118b09ca7db (diff)
target: simplify alua support
We always support ALUA for virtual backends, and never for physical ones. Simplify the code to just deal with these two cases and remove the superflous abstractions. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 4ae1d3913821..3c3a3019ce7b 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -556,7 +556,8 @@ static void core_export_port(
556 list_add_tail(&port->sep_list, &dev->dev_sep_list); 556 list_add_tail(&port->sep_list, &dev->dev_sep_list);
557 spin_unlock(&dev->se_port_lock); 557 spin_unlock(&dev->se_port_lock);
558 558
559 if (dev->t10_alua.alua_type == SPC3_ALUA_EMULATED) { 559 if (dev->transport->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV &&
560 !(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE)) {
560 tg_pt_gp_mem = core_alua_allocate_tg_pt_gp_mem(port); 561 tg_pt_gp_mem = core_alua_allocate_tg_pt_gp_mem(port);
561 if (IS_ERR(tg_pt_gp_mem) || !tg_pt_gp_mem) { 562 if (IS_ERR(tg_pt_gp_mem) || !tg_pt_gp_mem) {
562 pr_err("Unable to allocate t10_alua_tg_pt" 563 pr_err("Unable to allocate t10_alua_tg_pt"
@@ -1398,7 +1399,6 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
1398 dev->dev_attrib.emulate_tas = DA_EMULATE_TAS; 1399 dev->dev_attrib.emulate_tas = DA_EMULATE_TAS;
1399 dev->dev_attrib.emulate_tpu = DA_EMULATE_TPU; 1400 dev->dev_attrib.emulate_tpu = DA_EMULATE_TPU;
1400 dev->dev_attrib.emulate_tpws = DA_EMULATE_TPWS; 1401 dev->dev_attrib.emulate_tpws = DA_EMULATE_TPWS;
1401 dev->dev_attrib.emulate_alua = DA_EMULATE_ALUA;
1402 dev->dev_attrib.enforce_pr_isids = DA_ENFORCE_PR_ISIDS; 1402 dev->dev_attrib.enforce_pr_isids = DA_ENFORCE_PR_ISIDS;
1403 dev->dev_attrib.is_nonrot = DA_IS_NONROT; 1403 dev->dev_attrib.is_nonrot = DA_IS_NONROT;
1404 dev->dev_attrib.emulate_rest_reord = DA_EMULATE_REST_REORD; 1404 dev->dev_attrib.emulate_rest_reord = DA_EMULATE_REST_REORD;