Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1273579iog; Tue, 14 Jun 2022 02:50:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7n6XTSWLJnMy8GTwGMc4bSXmdezlkx2zDZ00+cpPJlAdFjJhLWJ3pDs9rcLlBIUbaGCzd X-Received: by 2002:a17:907:8186:b0:711:ee09:1317 with SMTP id iy6-20020a170907818600b00711ee091317mr3398666ejc.609.1655200259112; Tue, 14 Jun 2022 02:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655200259; cv=none; d=google.com; s=arc-20160816; b=HgkLqp6y6AtxxEQsNMkFcoRmB67q7PmP/2ssCtKCRt9JkORsFeSrVwUwJyLxkoCqT/ CMZQXSUhtoU5ASubVhIYKqgRzT/vdyy+jC+0wvU+B21vIhB58+2IdbsGVG9BJrvIjvlO tKO00So/Ec6TlCfV3O96/2zIsabrChmSGbNLHqq4If3q2wSW9qDMFGGxCPuDnk0asVqN e1rHPBbjOj7q6oEI2Mzl/hPsgOAcOBMx6iZfQUTy+8l1HFrom85Ll8CEpPpFZKbZEdIi nO/laBggeFj91nh7LRoj62NX47XKQwqN1kmC2cEUT4PledJN5Pg6v8oHdT8tOGelvfV/ 4MsA== 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:subject:user-agent:mime-version:date:message-id; bh=UhSswWMiIpbx/+N3YEYebgZ5bZJ/pDmbi4RB2LMt0LI=; b=H1vzdgk1RHQx9hyTGTWsVJc0Nf5x5PLTyA8vEw/Xpr2OJJTibdKG1UIgBuZhg3gthQ T2QH5Sb4YAiLDbyITFwTmzG5IF28mBZvHkWu4rPEEfjufESag9qywLHC0jc2849NPNY/ VQTrG7PMbMXS9eVIvwlW5hHuLW3JA5YaruLd1ESAKkUqAsJsQV/f251rQqsI4B4TZcna ZgimUQ0kObD0g8q6OjN0xGm6IqBcJjNoqYODmNCFMydn3pKY5aPYtbgl4N/Wk143ixs6 OpFOH7hr60IfkoCEI3tvd8e9DuE310iPzxvSle8TeuCsxf/EfwWBj8d+zZ9rlrg6a7FO TFzA== 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 cr19-20020a170906d55300b0071212933e05si11021541ejc.433.2022.06.14.02.50.31; Tue, 14 Jun 2022 02:50:59 -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 S234584AbiFNJaW (ORCPT + 99 others); Tue, 14 Jun 2022 05:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbiFNJaU (ORCPT ); Tue, 14 Jun 2022 05:30:20 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2606840E53; Tue, 14 Jun 2022 02:30:20 -0700 (PDT) Received: from fraeml736-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4LMjmY2nw7z6H7Tb; Tue, 14 Jun 2022 17:28:45 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml736-chm.china.huawei.com (10.206.15.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 14 Jun 2022 11:30:18 +0200 Received: from [10.195.33.253] (10.195.33.253) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 14 Jun 2022 10:30:17 +0100 Message-ID: <731c26d2-5124-60a6-c8de-d979ee2af467@huawei.com> Date: Tue, 14 Jun 2022 10:33:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH RFC v2 02/18] scsi: core: Resurrect scsi_{get,free}_host_dev() To: Christoph Hellwig CC: , , , , , , , , , , References: <1654770559-101375-1-git-send-email-john.garry@huawei.com> <1654770559-101375-3-git-send-email-john.garry@huawei.com> <20220614064403.GB31683@lst.de> From: John Garry In-Reply-To: <20220614064403.GB31683@lst.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.195.33.253] X-ClientProxiedBy: lhreml746-chm.china.huawei.com (10.201.108.196) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 14/06/2022 07:44, Christoph Hellwig wrote: > On Thu, Jun 09, 2022 at 06:29:03PM +0800, John Garry wrote: >> This reverts commit 6bd49b1a8d43ec118c55f3aaa7577729b52bde15. > > Please add an actual text describing why you are doing this and how > insteasd of this completely pointless revert line. > > > . OK. And in hindsight it would have been a good opportunity to mention something which I am undecided on - that is which scsi_device to use for these reserved commands? In this series I use the scsi shost sdev for all reserved commands, but maybe we should use the target sdev. Pros of using scsi host sdev: - don't need to worry about request queue freezing - don't need to worry about running out of request queue budget - available when scsi host is added - libata adds target sdev after some internal commands are sent, and this would be a bit painful to change, however adding the sdev earlier would seem to be a good change to make Cons: - generally better to use same scsi device as target (or is it?). For example, it seems better to have reserved scsi_cmnd.device actually set to the target sdev. - don't need to add stuff like ata_is_scmd_ata_internal() later in this series Prob other reasons which I have forgot about. Please let me know if you have any thoughts on this. Cheers, John