Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6950290rwi; Mon, 24 Oct 2022 08:04:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6kdKZSaD9w0A1brzSmV/iOX1vpkcN4FThxgkPHhbov5SgtN+TmZAuTTTNZLXMCZ768H4ae X-Received: by 2002:a17:907:2cea:b0:7a3:4ebe:5eb with SMTP id hz10-20020a1709072cea00b007a34ebe05ebmr8707703ejc.228.1666623843341; Mon, 24 Oct 2022 08:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666623843; cv=none; d=google.com; s=arc-20160816; b=XLax9h/c6K80xcgiJrQLEVtnQf87rvfiqrp5wQ2YIBAJ430HMsYhdognp5e3Z+NsZh gcrPuzZqad9Vsp9bZ5Gi5bV8cSN5T49W3kgL4OqmrrlKvwa5tXQcG9/AjEOfp5pXZ9sQ gczVK7XSCCHcIS//GBDmTfpY752Af7enzQaOzd14KCONqTpOAgElB8uDWFyM9AVMYTJb vIIDfu9gYcl211MN6N4rzZ/1CkllZ4UO1ZBZ2syRSwgBN439WizUgm0gt2r+2Ev3EsX/ n5GxwZ/x4k9mUO3zbuXAOd7xdTosvNncrSTitywHxbJQurmSAzA4gu9WEk7HCnkKw6fJ IzTg== 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=jVaj+qQtQ5l3osUwO9bl76wZML+H9zwIrfVxYA+fc+Y=; b=gdAlfVMypiF9h9W9LKvJJmA+bnyFSyRokOY9L7aHBp8bAewRluAiXsMtX2FFvS5SK7 V/VLkX5empkvTRxHOPLd4qjfEU5CDn2oE1bcYH8rEIuG0FcCdtrtksgm4naJwyS1zG5r 7+wDfE1OVJ3Z3M2OqCFT3U40RtWkZHlacjsi8g/0XMZCmRW2a3RLF6iZZcIOopoEZ7yE YvtLDdUiwKp7T4sHDd39XAqELjKOftfBwdUJ07Fm+4fdqjdNj9YIopclef4KNthQe0/r 68QjDsSRNnkNZL7xfk2kw/5M5fLKNOlSRxoXkSL9dvyB84tBC8s7DtH9zRPWtUj9w0fB W89A== 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 cs13-20020a0564020c4d00b0045c93142111si8710edb.70.2022.10.24.08.03.36; Mon, 24 Oct 2022 08:04:03 -0700 (PDT) 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 S236714AbiJXOlO (ORCPT + 99 others); Mon, 24 Oct 2022 10:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbiJXOkr (ORCPT ); Mon, 24 Oct 2022 10:40:47 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60BCE3DBFD; Mon, 24 Oct 2022 06:17:32 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mwvzz6c3mzHtcr; Mon, 24 Oct 2022 20:50:07 +0800 (CST) Received: from dggpemm500017.china.huawei.com (7.185.36.178) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 24 Oct 2022 20:50:19 +0800 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.31; Mon, 24 Oct 2022 20:50:18 +0800 Message-ID: Date: Mon, 24 Oct 2022 20:50:17 +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 v4] scsi:iscsi: Fix multiple iscsi session unbind event sent to userspace Content-Language: en-US To: Mike Christie , Lee Duncan , Chris Leech , "James E . J . Bottomley" , "Martin K . Petersen" , , CC: Steffen Maier , , References: <20221021235754.1968981-1-haowenchao@huawei.com> <2adeb439-646b-ebb1-b266-c3ed4750eac2@huawei.com> <64689ca9-62eb-27e1-63df-e2e8c1a59cbb@oracle.com> From: Wenchao Hao In-Reply-To: <64689ca9-62eb-27e1-63df-e2e8c1a59cbb@oracle.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.220] X-ClientProxiedBy: dggpeml500026.china.huawei.com (7.185.36.106) 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/10/23 11:21, Mike Christie wrote: >> I have some wonder about the target_id like be2iscsi which allocated from >> iscsi_sess_ida. Should not we get the target_id from iSCSI target? >> If they allocate target_id with an random value, how to handle the >> iscsi_user_scan_session which would check the session's target_id. >> > For iscsi, that target id is only a number that's used on the initiator side > to track the target. The target has no idea what it is and it's never > sent/used/passed to the target. > > For example, the qla4xxx driver uses it to lookup persistent target info it > has stored on it's flash. The other use is that we need a unique name for > the target in sysfs and that target id is used as part of that name. > . Thanks for your answer, I would update this patch and open-iscsi's PR.