From c59f067c199f1df1fe38952e2d733e43306ff323 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 13 Sep 2010 21:22:07 +0000 Subject: [PATCH] Merge of r2117: Scan host only if it has LUNs git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2118 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index f3feb245c..3230087ca 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1588,7 +1588,9 @@ static int __scst_local_add_adapter(struct scst_local_tgt *tgt, if (!locked) mutex_unlock(&scst_local_mutex); - scsi_scan_target(&sess->shost->shost_gendev, 0, 0, SCAN_WILD_CARD, 1); + if (scst_initiator_has_luns(tgt->scst_tgt, initiator_name)) + scsi_scan_target(&sess->shost->shost_gendev, 0, 0, + SCAN_WILD_CARD, 1); out: TRACE_EXIT_RES(res);