Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1587688ybk; Sat, 16 May 2020 16:32:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMrx9IQnnRRy+WBbl6xxXeH6bsiodByl+06Qki/8yIy/ttrc2po5bcDlOS2hLhsNmzVzrR X-Received: by 2002:a17:906:6893:: with SMTP id n19mr8628292ejr.354.1589671960607; Sat, 16 May 2020 16:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589671960; cv=none; d=google.com; s=arc-20160816; b=DRmyYZZTgOAy06C243+q/KH/7a+WpLmk5HAP6R/y0B6orJUlD5mRhjiFxskFY7XEcq 80LupgHjhDLlGfui9YPgwlnQeEtwD4fRo2TUm+FSAkEgR6CmiwkjyS2/6LAIQdn/bSOH HQUMKT3aYLukKOu+5q4fwa7Xhr4u6FtMPjaPZ4vexhndqpLZmJeoSTsWLky7CifI3Nfj wxKSItAKaqOvBi+YoQOlEn3QSh/JsFfu0dfEJrnUSljnuWJiFl7vQ/hepDji0rLmPyP0 k5wmy1XsHsTyOEiiWTVErHFRprJhsiSBkf79QSa3Mt+BLh7irPb2FukRg3PeUpHSXr5u NRbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VsIGqmQYU9B1hFiVmj/6ksJDLb/9MQhxyITf5iqCEAU=; b=xxYQqg0gxt6yJC6L2AoLH+/b2ePdghvBjbJLYOJszcfiNt9x2ceYZxqb1Z2dBDQ2Lk kHg7N4u2AiO/6aW6nwBWn0zVAwcEgFWRpKLgPAdJJD2Rk3xThKBRDI2HIPyl+2v3e2jd 41O7CbcIbjLbTNAWrivUEZg2iXkv7Qh/mF7BLxUBhzsWhh5N0zl0JRjGEl07Wwk4kuBa +mYEyHV+fIiQar1cNMXdIDkhX8bKlCKdtY5yiFffQDJPjRlEDr6ynYM4LcoM8ANc+4hw 9b1ubnE1AXcLUaHui/WE7EV8exbLp9EdkzjnysCwoFHll90pCTSimvsDsWi49FuUKuHG vnIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CAxm0r3b; 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=pass (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 p1si3941723ejd.333.2020.05.16.16.31.59; Sat, 16 May 2020 16:32:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CAxm0r3b; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbgEPX3s (ORCPT + 99 others); Sat, 16 May 2020 19:29:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726660AbgEPX3s (ORCPT ); Sat, 16 May 2020 19:29:48 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69DCAC061A0C; Sat, 16 May 2020 16:29:46 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id d21so6001076ljg.9; Sat, 16 May 2020 16:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VsIGqmQYU9B1hFiVmj/6ksJDLb/9MQhxyITf5iqCEAU=; b=CAxm0r3bkWmXjkeiCzLPuKYnFKjmYcTMlB211VAPCdb2e0rDkYvjgKujtHQo5YnQtR WYhrUreg7ADZxvFKkuBOju+THp+1gYsGi9JRt/ejoHugqQ4Lt4ZAXR+GRw0L0A+66/UM aT52BE/bEQrnitmXPtcIktSrpJmQpc7TJEMrOI75rNNhQB37g9VgqnacNxAKPZzWKTyC t5lEVHc9351QfxtHaytLZpm6wG6w9yCKQ6BfTZJuXdw3BjiOXq0PASbRavhsXMe4v5m7 e6iGVuXlEwtLZbH1wQsJO1JSDfci6337NAg2ZQm4a6IpeQIYHn+TtN7fx0LsK8LP8LjF lWxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VsIGqmQYU9B1hFiVmj/6ksJDLb/9MQhxyITf5iqCEAU=; b=MAg9pFOhYzriAxZ871VKtOgkLjY5lbZ+AWH01z4/vDbK1PAq8EKlZvBiBgJH0jjULr fbjEtKp6TmKp95hBSP5RRzMjhwDgKtonkKsUKTD+p4rdHYPyn5lHX9eJJsOYP2gD55tn +ff1EEMghmloDuJqNNuS5ajbzuq4okQqwv5GHN89TfOn3jXAK5onOwzklHc5XiDBervm F54BoSETgF56gbC2bXgMkQuD3NPwi5aqnbJVhuu5wQAI4Gkc48DLQcL+O850R8Y+nEC+ TDo8VNcDztOC2zgjVq4nOsLR4I5FVP7L3+GHwdTwrko/8hpnW86aT3DErCmpqmUefGNn DltA== X-Gm-Message-State: AOAM533avlE1crr8Mc++AtLc6QULDDBy4TbR7XJBNukXxJKAPOcSqq+L RxFRGlKgNA8O99mNNI2VZtiAnovjpuBN4gG0HtE= X-Received: by 2002:a2e:a545:: with SMTP id e5mr6015544ljn.271.1589671784750; Sat, 16 May 2020 16:29:44 -0700 (PDT) MIME-Version: 1.0 References: <93c437ce-f881-9f54-5e39-afa8afd96141@redhat.com> In-Reply-To: <93c437ce-f881-9f54-5e39-afa8afd96141@redhat.com> From: Lance Digby Date: Sun, 17 May 2020 09:29:38 +1000 Message-ID: Subject: Re: [PATCH target] target: Add initiatorname to NON_EXISTENT_LUN error To: Mike Christie Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mike, Thanks for the review! The pr_err Detected NON_EXISTENT_LUN is the error messages issued for the TCM_NON_EXISTENT_LUN retcode so I believe they are the same. Simply scanning for the wrong lun on an initiator will generate this error on the target but not generate an error on the initiator. And I have seen installs, with a lot of initiators, automate the scanning of such luns incorrectly deemed missing. While this looks like a simple problem it can take days to get access or the tcp traces to sort it out. Within the same routine there is another pr_err for TCM_WRITE_PROTECTED that I did not add the initiatorname to as I thought this would leave a heavy footprint on the initiator. If you believe this should be changed for consistency please let me know and I will add this and change to nacl->initiatorname. On Sat, May 16, 2020 at 9:50 AM Mike Christie wrote: > > On 5/13/20 11:01 PM, Lance Digby wrote: > > 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. > > > > Signed-off-by: Lance Digby > > --- > > drivers/target/target_core_device.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c > > index 4cee113..604dea0 100644 > > --- a/drivers/target/target_core_device.c > > +++ b/drivers/target/target_core_device.c > > @@ -100,9 +100,10 @@ > > */ > > if (unpacked_lun != 0) { > > pr_err("TARGET_CORE[%s]: Detected NON_EXISTENT_LUN" > > - " Access for 0x%08llx\n", > > + " Access for 0x%08llx from %s\n", > > se_cmd->se_tfo->fabric_name, > > - unpacked_lun); > > + unpacked_lun, > > + se_sess->se_node_acl->initiatorname); > > You can do nacl->initiatorname. > > Do you also want add the name to the tmr case? It's probably not common, > but the error message would be consistent. > > > return TCM_NON_EXISTENT_LUN; > > } > > >