[RFC PATCH 2/2] target/iscsi: discoverable_while_disabled SendTargets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the discoverable_while_disabled TPGT attribute is set, then add a
corresponding entry to the SendTargets response, regardless of whether
the TPGT is enabled or not.

This functionality is usefull for clustered iSCSI targets, where TPGTs
handled on remote cluster nodes should be advertised in the SendTargets
response.

Signed-off-by: David Disseldorp <ddiss@xxxxxxx>
---
 drivers/target/iscsi/iscsi_target.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 4e68b62..affc4f0 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3453,7 +3453,8 @@ iscsit_build_sendtargets_response(struct iscsi_cmd *cmd,
 
 			spin_lock(&tpg->tpg_state_lock);
 			if ((tpg->tpg_state == TPG_STATE_FREE) ||
-			    (tpg->tpg_state == TPG_STATE_INACTIVE)) {
+			    ((tpg->tpg_state == TPG_STATE_INACTIVE)
+		       && (tpg->tpg_attrib.discoverable_while_disabled == 0))) {
 				spin_unlock(&tpg->tpg_state_lock);
 				continue;
 			}
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux