Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2334053ybk; Sun, 17 May 2020 18:04:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYcNEDcRzuMZYw9i7UtDSF3//f5ptltAfE4pYkxzLSU09+TE6iw9qRsQZ2gSHM2aG9Kf/X X-Received: by 2002:a05:6402:2292:: with SMTP id cw18mr11845159edb.217.1589763846650; Sun, 17 May 2020 18:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589763846; cv=none; d=google.com; s=arc-20160816; b=ljexx5VMVeoIn8rq+MoWofNBLgM/25uwRL8KOarVcRAc1YTdX9XYc82xAJ3Ljb+pkN lhHe4fJgsYvzrVyzonev3b9YNhf30D5BzmFmdvCey53e4Z7li1gg49cKAZczowjDsZ7C 7ogzD1/Hxw6GcH0/soLdW8xtPRN7p+OW5ZB7g4DjiQUvLo7yWUZparOFdCBb38mV3U7S M5+a9FdZoM+em8JvpqcSXzvM3DVx4t53y8tfbVzZg6F0+SBnR/RIClmAwNl0Bch1QVnJ IODNL79+9JeJB6O29CjiG6XsmTiC2xqY3baW1JCIIQd0isWDWuT3++5jF+m8cS5z2roK Qsvw== 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=cElIIYyJDPkLVWUxrz4v0d1891qYoBkXO8M2vNfJEH4=; b=sk+C5PSYsQWNUNTlIdqFfxRIxmNy3cHE/R3A/fHkVIlvPSjbXQkhjlQgToUrPinSMZ BTk6Wa4JcbHhnsEjYg8HmdHn9lG1xiGAStfedT3SR7UUEExl5s8PhbIAJxwPbO11qrEq WVE3rNKdgPIeBu0khpNqUgje4GgrINv13OtKonMh7+DziWhzkh+phh0krjd3n4xR3xtG MlAqs1i1Vv2IhrO6qWnYkt3ohf+Qii+MpPNAJ6eVgTBZiHr7C0Cq+swxVkr9xt1ybfxw ienfhuQEsu+BAJUG0YB7YFR1DtNT+JsCtgpwNR9PORluhVUJvVZiUZHFd16koZPPPWBw QlgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YsFijEJH; 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 o12si5994968edq.34.2020.05.17.18.03.43; Sun, 17 May 2020 18:04:06 -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=YsFijEJH; 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 S1726786AbgERBCT (ORCPT + 99 others); Sun, 17 May 2020 21:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726665AbgERBCS (ORCPT ); Sun, 17 May 2020 21:02:18 -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 1BCF5C061A0C; Sun, 17 May 2020 18:02:17 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id u6so8022634ljl.6; Sun, 17 May 2020 18:02:17 -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=cElIIYyJDPkLVWUxrz4v0d1891qYoBkXO8M2vNfJEH4=; b=YsFijEJHPXeg94GNEmqZJLNcWewKowqaDTETzBP1hzhBlf5dXDzrOloBm21bmvyeN+ 6hoexuKacMYoUy2FGrqb5zz1pE9vIXCMRRL0Nz8zgvkyBRV+yOYQ5kzNpssT38FuFee4 6sAJJZWy1Pth2HLVK09p/3c4Y0Ye/QX2h4owQQuTUo+N3kaRwqWKSl0FuhYK8He0hSCj qI/4aM3fkrPMvYPIU1UIYU/tnvfieZnQYWV0mnRQX6AInyrg5dFzWLRK3UgD7nfO7Ws9 Qd/5rGvcHYP0aT89CKO2Y5lKTekO/Z1qnEuCFByvWufQ2hamJL2nWlqjYRVmzNCFk0BV f61g== 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=cElIIYyJDPkLVWUxrz4v0d1891qYoBkXO8M2vNfJEH4=; b=ASy61LHdncg2i6cI1bHm6/+aC14hLvcuF5AdoiZKkIa7dOXq29iWCGTbA8hYXnnGkk nHdCNMDgnU99J8Q//utorhof3WHtXoATShUT7yMU4cK+mMw2h+pq+5kOpdbv0lQkz8XH 01AtOqBxr2aqnBoL43YG0jjvOneDZY09yXQJLpi4yswvgQL8gokweP7+9wMcGMjqfuuH r50qhNkPMm9EvprzS3fW665vq5cxnnoibh+44eqowq4tcbraCQVJ7LVFfpKNDXucr6SU zNnjkCIVUGelXjhjapRej1TNSrhgHId+dYeJvFmdeENrAyQ0HOdWLpkGk8aE8mdyINxd fPWQ== X-Gm-Message-State: AOAM531BT8OsT44WePqfMAnz8dJuiiZ8J9kpcWtuQDBDeaTjAbcmdcd4 BpFAHFslDr0gMFOdEo1zcz3z6jyLAkjT2k5ePXg= X-Received: by 2002:a2e:b891:: with SMTP id r17mr8744535ljp.34.1589763735537; Sun, 17 May 2020 18:02:15 -0700 (PDT) MIME-Version: 1.0 References: <93c437ce-f881-9f54-5e39-afa8afd96141@redhat.com> In-Reply-To: From: Lance Digby Date: Mon, 18 May 2020 11:02:03 +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 Thanks again Mike will send out a new version. On Mon, May 18, 2020 at 5:16 AM Mike Christie wrote: > > On 5/16/20 6:29 PM, Lance Digby wrote: > > 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 > > I'm not sure what you mean by heavy footprint on the initiator part means. > > I would say do whatever is helpful to you to debug the problem. For > TCM_WRITE_PROTECTED I'm not sure the initiatorname is helpful. I think > the target name and tpg would be useful, because I think you sometimes > set it at the tpg level then it gets inherited by the LU. But I think > it's a pain to get to the target name from this code path, so I wouldn't > worry about adding it now. > > > believe this should be changed for consistency please let me know and > > I will add this and change to nacl->initiatorname. > > Just to make sure we are on the same page. I was just commenting about > the other NON_EXISTENT_LUN instace in transport_lookup_tmr_lun. I just > thought we would want/need the same info there. > > > > > > > > > > > > > > > > > > > > > > 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; > >>> } > >>> > >> > > >