Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4483135ybb; Tue, 7 Apr 2020 08:21:10 -0700 (PDT) X-Google-Smtp-Source: APiQypJqzhr9t7DLGaa4IHmn36KUA5RWlLkOczd6xrnXRp+aJQshW7D7g4yJYhOdKeuAyolP++09 X-Received: by 2002:a05:6830:1e79:: with SMTP id m25mr2021735otr.36.1586272870388; Tue, 07 Apr 2020 08:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586272870; cv=none; d=google.com; s=arc-20160816; b=LJi2TYqlenFY8rnpNVu6LMjXIkB70yixScWdbyGASLbARjOSL+4HbJIGR5ZVzTyE0m DE4N4e8qg+O9iC9ary/W3/fxqnPUFlBGK5bqQ+cfEcHk9kqwJQnkc3n9g4nSO/DubThS SErlbzo4RcKKptyX6lKM3ubSvmSHIdTTl215K5vxgxDDZiLKXT7uH3XrU6zZfVDpiXds Vs1rhSj5PUbbT1d0I7QPZyf956XOaSYgP7NTx3UiTUBmMGJLy8II0v/PpxX3/L8OC16O qTSOb1ku8lHEcKZWDDxkLMTb+1m46UKQLTwcoVRjJYbZafCl/cIssMWfaV/kRLzFwbKr 2B6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=aicRsDQAnwN5ItDe6mbY1beigeygM9bm5sS9hFNQsus=; b=gvUkbZrPtn7js9yuGOfFRJH52P2IXcXdZbh94iNl01K3pvfJKKdoYkhmBf7ohpUzgU j2PHlNgV8qPH2yUQGJY072eAJ0QMW+VJdqCEPDVo5K71XH/rA34JNrwMUn9d6mPhtzDz laNe7CNTx22szofy18N2gsjcwot2WGlEKO1/WmY3nptVohqPWkldg9RU4h0uWYsIQb8A dyYUtW/iwu0Z3bU6HE/leAbD5TUszIdVjx+nQHHEZfFMQmThMh+Fd/08OhppN2dFo4gh G8k4Pfw3ahCQ/7R2F2IO1AB5aaiv3NLqRdQflBLe3qZDGyyrEiQIdR61wVRg89iRbEJG hgVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c133si824596oif.272.2020.04.07.08.20.57; Tue, 07 Apr 2020 08:21:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729410AbgDGPUB (ORCPT + 99 others); Tue, 7 Apr 2020 11:20:01 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2638 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728917AbgDGPUB (ORCPT ); Tue, 7 Apr 2020 11:20:01 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 5EA12238EC4E6DA72243; Tue, 7 Apr 2020 16:19:59 +0100 (IST) Received: from [127.0.0.1] (10.210.168.238) 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.1913.5; Tue, 7 Apr 2020 16:19:57 +0100 Subject: Re: [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands To: Hannes Reinecke , Christoph Hellwig CC: , , , , , , , , , , , Hannes Reinecke References: <1583857550-12049-1-git-send-email-john.garry@huawei.com> <1583857550-12049-3-git-send-email-john.garry@huawei.com> <20200310183243.GA14549@infradead.org> <79cf4341-f2a2-dcc9-be0d-2efc6e83028a@huawei.com> <20200311062228.GA13522@infradead.org> <9c6ced82-b3f1-9724-b85e-d58827f1a4a4@huawei.com> <39bc2d82-2676-e329-5d32-8acb99b0a204@suse.de> <20ebe296-9e57-b3e3-21b3-63a09ce86036@huawei.com> From: John Garry Message-ID: <38c1592d-c90a-d6ca-1e7e-e8cc665aaf22@huawei.com> Date: Tue, 7 Apr 2020 16:19:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.168.238] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> >> >> FWIW, the only other driver (gdth) which I see uses this API has >> this_id = -1 in the scsi host template. >> >>> But alright, I'll give it a go; let's see what I'll end up with. >> >> note: If we want a fixed scsi_device per host, calling >> scsi_mq_setup_tags() -> scsi_get_host_dev() will fail as shost state >> is not running. Maybe we need to juggle some things there to provide a >> generic solution. >> > It might even get worse, as during device setup things like > 'slave_alloc' etc is getting called, which has a fair chance of getting > confused for non-existing devices. > Cf qla2xxx:qla2xx_slave_alloc() is calling starget_to_rport(), which > will get us a nice oops when accessing a target which is _not_ the child > of a fc remote port. Yes, something similar happens for libsas [hence my hack], where sas_alloc_target()->sas_find_dev_by_rphy() fails as it cannot handle rphy for scsi host as parent properly. > And this is why I'm not utterly keen on this approach; auditing all > these callbacks is _not_ fun. > Understood. And if you can't test them, then a change like this is too risky for those drivers. Cheers, John