From 11fade176ad98c2bc121e3c32d8785417b2562a4 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 13 Sep 2010 21:15:02 +0000 Subject: [PATCH] Scan host only if it has LUNs git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2117 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 885d2fa21..cb23f953f 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1592,7 +1592,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);