]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iscsi-target: Enforce individual network portal export once per TargetName
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 19 Feb 2013 05:01:02 +0000 (21:01 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 19 Feb 2013 05:27:55 +0000 (21:27 -0800)
commit2ce7bd6975fe65612f5a8ef63dcaf060f9157c2b
tree18066f37c9070b23b30754052d113b2f6fb9022c
parentd4c6c3fb7ce9826e072e2278d96aa2c638b5bbfd
iscsi-target: Enforce individual network portal export once per TargetName

This patch enforces individual network portal export on a once per TargetName
basis, thus preventing a network portal from being exported multiple times
across multiple TargetPortalGroups in a single TargetName instance.

This is done in iscsit_tpg_check_network_portal() by walking tiqn->tiqn_tpg_list
and tpg->tpg_gnp_list using iscsit_check_np_match() looking for an existing
network portal mapping from iscsit_tpg_add_network_portal() context, but only
when no pre-existing tpg_np_parent pointer is present.

Reported-by: Andy Grover <agrover@redhat.com>
Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_tpg.c