Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp791360rwb; Thu, 15 Dec 2022 02:27:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf4W27WixeH1weQeWuHPW2QIZwjUx4m4QyJJ+VNRWu78gxzMf0r0lyZOlNGP+zhig7xfoPcl X-Received: by 2002:a05:6a20:bc97:b0:aa:e01:2d4d with SMTP id fx23-20020a056a20bc9700b000aa0e012d4dmr29634472pzb.8.1671100045540; Thu, 15 Dec 2022 02:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671100045; cv=none; d=google.com; s=arc-20160816; b=ms12feqKaeWGaYGVcsZF+h7sQZGMSmR5i8EmxKhuYwD2dKktk9rtGLRzwkwFg4zebO uDmfVbB8Qsopdg7MwXP70xFpDzqoLXMkkekMEeP1atouIMSekuALVBmZvIyQJ6XgQafC EPvcqgImZXKvokazsvqGzG/2UV9XMCErwV+hM1lKENGoFKglCaJT9T2A/xcEAZp1iwRp I31T9NqeuGmVkDknQ5d49GbA+2ypAP4gF3dPpwkaxi2kj07Ja5whavNwhDiC0SIPx4bu cRJMKS9fgjMDf97P3tliahKBM8jUZ/TFgVhjFQNx6sij9485uMziLN/xgOjNQt83KzVf 3HKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=GdYdn2zvt/obQzvde83xQWjO0GifY2s9fm41GhV70oQ=; b=nSFKOAX9nbWPb4jP00ySRUR3ahBC+mOyD5kUeKfU32/JBM+ygjAjrL6EbatwjIk0Eh xCgmG+O0L5Hb//x6+thljwsRsgi/3h3gRjdVnyCXbZn5d/6eiucWhttGQTtsaMEP9wlA ko0d2eghhWv81rW77x3qR1AmkB1wjjQ1MQidGFrjg1BbLsA+UC0U97a0FK9gHgc4zBwI DOLPvMUNDa9w01p/e81QASxxRr+4dtt0P8yvufwVL6PXJeSrlbDapY2pCWLzJwFqCKKk WNyDIM8rqHcV7RCQAfeYVKuAkZGYV3Y/8AtZeddjdaAwP4ZYIaxd2BRrxlkWgt/tw+ij pTKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a63ba09000000b00478bec284fdsi2447416pgf.26.2022.12.15.02.27.16; Thu, 15 Dec 2022 02:27:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbiLOJJh (ORCPT + 68 others); Thu, 15 Dec 2022 04:09:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiLOJJf (ORCPT ); Thu, 15 Dec 2022 04:09:35 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21CF320F59; Thu, 15 Dec 2022 01:09:34 -0800 (PST) Received: from dggpemm500017.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NXmcJ17bmzmWbT; Thu, 15 Dec 2022 17:08:32 +0800 (CST) Received: from [10.174.178.220] (10.174.178.220) by dggpemm500017.china.huawei.com (7.185.36.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 15 Dec 2022 17:09:31 +0800 Message-ID: <57c12317-c229-8cbe-b3d2-d799ea5f554c@huawei.com> Date: Thu, 15 Dec 2022 17:09:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts Content-Language: en-US To: Christoph Hellwig CC: "Martin K . Petersen" , Mike Christie , "James E . J . Bottomley" , Lee Duncan , Chris Leech , , , , , References: <20221214070846.1808300-1-haowenchao@huawei.com> From: Wenchao Hao In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.220] X-ClientProxiedBy: dggpeml100019.china.huawei.com (7.185.36.175) To dggpemm500017.china.huawei.com (7.185.36.178) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/12/15 15:06, Christoph Hellwig wrote: > On Wed, Dec 14, 2022 at 03:08:44PM +0800, Wenchao Hao wrote: >> When iSCSI initiator logged in target, the target attached none valid >> lun but lun0. lun0 is not an valid disk, while it would response >> inquiry command with PQ=1 and other general scsi commands like probe lun. >> The others luns of target is added/removed dynamicly. > > I can't find any special casing of LUN0 in RFC7144, can you clarify > where you think that treats LUN0 any differently than other transports? > . This is not described in RFC7144. The sense described above aims to tell that a dummy lun is useful. In my opinion, if the addressed lun still response the inquiry and other commands, we should not skip it, maybe let the scsi drivers like sd/st/sg to determine how to handle this lun accordint to the PQ value. As discussed in following mail, another drivers would be broken too. https://lore.kernel.org/linux-scsi/CA+PODjqrRzyJnOKoabMOV4EPByNnL1LgTi+QAKENP3NwUq5YCw@mail.gmail.com/ The key point of my patch is to add one way to map dummy lun to an sg device.