Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4546520ybb; Tue, 7 Apr 2020 09:31:51 -0700 (PDT) X-Google-Smtp-Source: APiQypIGLB0e+pvQoMBR61GGQnq/2wR++fS2rVv/BZ9NHRcX+wqxp0xNusbuBISF6gizPW+ZRKO3 X-Received: by 2002:a9d:12cc:: with SMTP id g70mr2200866otg.115.1586277110951; Tue, 07 Apr 2020 09:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586277110; cv=none; d=google.com; s=arc-20160816; b=PbkkwXaliYr60Bupr2C3CsD5OmDrKQuFAbiNeErwRvynuH902m+8jRDA802Q1lJoUv 5uFUkWVpajIECWrxM2guIWxjycNFxbhaGY0el+RCmeC6f37aRsoqwElYGJIyoz/Gs6Eo xDy9o/EC5qWFYOTNDTjRyZ+lpljwRleJNpy5CuGaABDDwO3iewYqj7TEOUksgFrcs9wd bKcX3bXEpvZKNYCPBNJpUcz0DFvVq6j6Tdl+46Kr9NMKv+np1uZHRtN9KLAo6t0Mxc7a mwwh0xhMeDIow2lfzVRTNlWIo2GYsOboU6eieYF6sMTMK/Nu6aUPCEko2qprDoIwvug1 7w+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nuh4nVXCUJwlPsAFN4ZcIX/xOtefRx7Y3gNridK28QY=; b=0G0qLvWvVrGYgVvwy8oEw5T3SsRoKLyrJLKu1Dm1wIsEOhIBEsfns8Mzfw1N3eGtcf WhWlk1g78xZqLYJtoMe9bgLoicjDnrQDgqPJvl7N5U1JOkjXx5HicS+1oIdVroChcCDU HOoeqvIIgqRS7X1l5dfHwqYhbiduHnesHumK4ULoCj0W9YWhf1MUSeqBQdqwt8jsqRFF tpkJ9SgQlYi86z/cgnwak3OULdgcT3ISBLiQTOstDINuG1eBlLoA7RDpFpkfNS5PCX4m WcDIGFY6mbnRsg8kkiUOiMh8McX4ZaR2Gmw7y3gpDEkXWotD9+VzxhMdpKvUTAdLZNAm paNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ciZFBeMv; 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 l24si1499263otn.57.2020.04.07.09.31.38; Tue, 07 Apr 2020 09:31:50 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ciZFBeMv; 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 S1728176AbgDGQaw (ORCPT + 99 others); Tue, 7 Apr 2020 12:30:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56646 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgDGQaw (ORCPT ); Tue, 7 Apr 2020 12:30:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nuh4nVXCUJwlPsAFN4ZcIX/xOtefRx7Y3gNridK28QY=; b=ciZFBeMvY6ceMxZGa0UjRmpv6b Vx/9nAHJ7cxHdVPsGVO0PNZBmYRA2oafiriwUZf2uaLm6sd/JHTHiYn96WGCqPGsDik4kWqPeniyw bdPj2+66DNoBS6v1/G5yrPYOsYOcP/bvsesb1lQ1CaETVyn/lrp3nTn0SCkBzpTmooMJ3D/tGkZ+R NXpVCbx8OlXunsKpnNLxI2zsDYD8s35fOl9y5pQxPznzzFfQF6aC55FJlcxyBErnqhLDdJdomi9i8 iGQlKFyYr8/UGVmLCIfv4Z/U8ElXOR0AFlrBMC4KujJgBb0wM24+ct4pshpcOFedveoKb2djkQ37L 0xZMV4/g==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLr7R-00017v-Tj; Tue, 07 Apr 2020 16:30:33 +0000 Date: Tue, 7 Apr 2020 09:30:33 -0700 From: Christoph Hellwig To: Hannes Reinecke Cc: John Garry , Christoph Hellwig , axboe@kernel.dk, jejb@linux.ibm.com, martin.petersen@oracle.com, ming.lei@redhat.com, bvanassche@acm.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, virtualization@lists.linux-foundation.org, esc.storagedev@microsemi.com, chenxiang66@hisilicon.com, Hannes Reinecke Subject: Re: [PATCH RFC v2 02/24] scsi: allocate separate queue for reserved commands Message-ID: <20200407163033.GA26568@infradead.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39bc2d82-2676-e329-5d32-8acb99b0a204@suse.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2020 at 04:00:10PM +0200, Hannes Reinecke wrote: > My concern is this: > > struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) > { > [ .. ] > starget = scsi_alloc_target(&shost->shost_gendev, 0, shost->this_id); > [ .. ] > > and we have typically: > > drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: .this_id = -1, > > It's _very_ uncommon to have a negative number as the SCSI target device; in > fact, it _is_ an unsigned int already. > > But alright, I'll give it a go; let's see what I'll end up with. But this shouldn't be exposed anywhere. And I prefer that over having magic requests/scsi_cmnd that do not have a valid ->device pointer.