Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2336133ybk; Sun, 17 May 2020 18:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfJwb2TiUBEbBcNdHPA21gvZVfTmkDrCMGwycir6Ti/xXwN4rgSKYiNfiGl09hqWMfGH+i X-Received: by 2002:a50:9317:: with SMTP id m23mr10585304eda.65.1589764062761; Sun, 17 May 2020 18:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589764062; cv=none; d=google.com; s=arc-20160816; b=a9eYv7BM1KTc4ZvuXTZJwtdkBpAnOUx5r8qgesgtqs6bCBcdt8ltE7npJijrOdTeTu JAyxIpQrZgZehLy7YfrWRh4Esntyiitnz7sKrCE5aTccHYt7y2v8I+2/xC/XYXQNFg+5 k+bfifhuo2J6tPQsyMBi4LKQ6UKyNBSqp1NgT4S2YmlTxbGW4/vbBm1K+DoLW8qkjeUH bqE6BkZzo30EgzAuSBjarjP/qwMSXYxA8MsZtnwW5oBYUUShMaOlCfxzA/hG2H0yBCv7 ZWyn3poSAbRfQld0/K403Pk/pD+ltzNYW6139aWYJHomeMgUwo6Zq1zLMYdkHlV9JSJm x+Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id:date :subject:cc:to:from; bh=RdYoa4lY6xKo5UPkcquv3xqS4oZ6eExxthZyz1Yz79M=; b=ZhHu/3R5EagLF2HkBmvDfb+KWWmfd1iGqqlEbrC+BqdEaoCPYrgnf99rtJ4MXfZgIp cJ0BdnE7VzWA/1MV3v2mKqWEZEARPyPdSaSKv/TlqJc1TbnnkobkS6wHS0Od8hTUc2fN U1MFoJVmj3q828y8O04Q+mcosxFEqoX9m3Xlp2mmyd7E1gRhfb3t0HXzbFeMsrzsYsDu 7npyd5F3bSrNEeRX/FIu2xD6ckD/xZNbN4dPryMTqNa3o4bPFfih9CHPBprTwIazT3NV ziCvAfX25ZoqxE5nN/RhP5arX/HEP03kSM4NCBpJ4Kr03lh1Ac8AuwRboAr0QGPSJDp6 2yRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si5033310edx.300.2020.05.17.18.07.19; Sun, 17 May 2020 18:07:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbgERBC3 (ORCPT + 99 others); Sun, 17 May 2020 21:02:29 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45736 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726665AbgERBC3 (ORCPT ); Sun, 17 May 2020 21:02:29 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-4JzaRyvBOUKOHEemSFbP9g-1; Sun, 17 May 2020 21:02:25 -0400 X-MC-Unique: 4JzaRyvBOUKOHEemSFbP9g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 29B68474; Mon, 18 May 2020 01:02:24 +0000 (UTC) Received: from ldigby.remote.csb (vpn2-54-25.bne.redhat.com [10.64.54.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 907A1398; Mon, 18 May 2020 01:02:22 +0000 (UTC) From: Lance Digby To: mchristi@redhat.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 target] target: Add initiatorname to NON_EXISTENT_LUN error Date: Mon, 18 May 2020 11:02:16 +1000 Message-Id: <9b13bb2e1f52f1792cd81850ee95bf3781bb5363.1589759816.git.lance.digby@gmail.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: gmail.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The NON_EXISTENT_LUN error can be written without an error condition on the initiator responsible. Adding the initiatorname to this message will reduce the effort required to fix this when many initiators are supported by a target. This version ensures the initiator name is also printed on the same message in transport_lookup_tmr_lun for consistency. Signed-off-by: Lance Digby --- drivers/target/target_core_device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_co= re_device.c index 4cee113..15064a5 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -100,9 +100,10 @@ =09=09 */ =09=09if (unpacked_lun !=3D 0) { =09=09=09pr_err("TARGET_CORE[%s]: Detected NON_EXISTENT_LUN" -=09=09=09=09" Access for 0x%08llx\n", +=09=09=09=09" Access for 0x%08llx from %s\n", =09=09=09=09se_cmd->se_tfo->fabric_name, -=09=09=09=09unpacked_lun); +=09=09=09=09unpacked_lun, +=09=09=09=09nacl->initiatorname); =09=09=09return TCM_NON_EXISTENT_LUN; =09=09} =20 @@ -174,9 +175,10 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u6= 4 unpacked_lun) =20 =09if (!se_lun) { =09=09pr_debug("TARGET_CORE[%s]: Detected NON_EXISTENT_LUN" -=09=09=09" Access for 0x%08llx\n", +=09=09=09" Access for 0x%08llx for %s\n", =09=09=09se_cmd->se_tfo->fabric_name, -=09=09=09unpacked_lun); +=09=09=09unpacked_lun, +=09=09=09nacl->initiatorname); =09=09return -ENODEV; =09} =09se_cmd->se_dev =3D rcu_dereference_raw(se_lun->lun_se_dev); --=20 1.8.3.1