Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp976295ybe; Wed, 4 Sep 2019 10:32:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDqUzPvpaazL+P7Gj1L2I9dOgFnAwySIMpOCATz6yUF0NW7fRy+qpl1gNojrr0H5CqctXT X-Received: by 2002:a17:902:7c91:: with SMTP id y17mr23572516pll.46.1567618326009; Wed, 04 Sep 2019 10:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567618326; cv=none; d=google.com; s=arc-20160816; b=EX+mEkyRSwA1/5jKeb/FYhB1srVCTOV4ErPcyUNjcp/S8jNHFM4SmZl9m9d+qgX0UK O+Bw3vIgH75cRwPkjJqkrcrTOL1LH64uDHyyTRkbJ7xY9OVSU2egOZK8CJHb9/lQickc 4VJVIDdLdBhabw4DzCHkbAwxK0LAG0fZTvz2mE9lk4GBHqb6luGxVGoY7pIsh6Fbsm4d ha9sREs+EFHZWllu6esHuxGpP6oGIoftESSKvi+V7oPjNexHVnIApgLv2rW8Fe13RZ4C +P2kir8HFVYyjLdhL2+nHMSHSmSxvgp13xVMX9T61cQx2rwahHWWneKbsldlBlPv2ZuF K+9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=SM4H9Xblp0c39iIeozcN2ZfBsZ4goKJ3TNTyiEWzlX8=; b=kglE+sAbeP+t6k8MJulw8d2Tpuc8Oy5lJLedyyojo6BhkUMtZ8zZ62A6Yg+q8LNOGv Y9QqjcFcFOlPPL5F77fSLsmot2uZ5wKSTSV4aIEuK0WJURoEutVcDOyiHhu/WsiRqIj+ Tg1y5gcIGiOpbtHXy8liClS7OOASE/uRyNr4HDkGkS3hQyMPQaR1aXdx7XcC9UlZJWeq KCPv4cBKNEa5/6PUo38FKi4p0q5kgNPPjLtM48r3h9PNo7ReSC/MJQqGXR1z8XQj62IJ kUrBDTKBHPBKw73fcy5BA8riuvO80RaqmFGz3rQIpi/YXYUtpRojaVPFXxNLKU7wSVMb 7PQg== 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 c3si17964922pld.393.2019.09.04.10.31.49; Wed, 04 Sep 2019 10:32:05 -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 S1731584AbfIDR3f (ORCPT + 99 others); Wed, 4 Sep 2019 13:29:35 -0400 Received: from ale.deltatee.com ([207.54.116.67]:58972 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729020AbfIDR3f (ORCPT ); Wed, 4 Sep 2019 13:29:35 -0400 Received: from s0106ac1f6bb1ecac.cg.shawcable.net ([70.73.163.230] helo=[192.168.11.155]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i5Z64-0008Ty-GK; Wed, 04 Sep 2019 11:29:33 -0600 To: Keith Busch Cc: Christoph Hellwig , Jens Axboe , Hannes Reinecke , Sagi Grimberg , "Martin K . Petersen" , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Keith Busch References: <20190831152910.GA29439@localhost.localdomain> <33af4d94-9f6d-9baa-01fa-0f75ccee263e@deltatee.com> <20190903164620.GA20847@localhost.localdomain> <20190904060558.GA10849@lst.de> <20190904144426.GB21302@localhost.localdomain> <20190904154215.GA20422@lst.de> <20190904155445.GD21302@localhost.localdomain> <20190904163557.GF21302@localhost.localdomain> <20190904171445.GG21302@localhost.localdomain> From: Logan Gunthorpe Message-ID: <5a4cf3b0-daa2-30de-63b2-c5b28c5bb7b4@deltatee.com> Date: Wed, 4 Sep 2019 11:29:25 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190904171445.GG21302@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.73.163.230 X-SA-Exim-Rcpt-To: keith.busch@intel.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, martin.petersen@oracle.com, sagi@grimberg.me, hare@suse.com, axboe@fb.com, hch@lst.de, kbusch@kernel.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH] nvme-core: Fix subsystem instance mismatches X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-04 11:14 a.m., Keith Busch wrote: > On Wed, Sep 04, 2019 at 11:01:22AM -0600, Logan Gunthorpe wrote: >> Oh, yes that's simpler than the struct/kref method and looks like it >> will accomplish the same thing. I did some brief testing with it and it >> seems to work for me (though I don't have any subsystems with multiple >> controllers). If you want to make a patch out of it you can add my >> >> Reviewed-by: Logan Gunthorpe > > Thanks! I'll make it a proper patch and send shortly. > > For testing multi-controller subsystems, I haven't got proper hardware > either, so I really like the nvme loop target. Here's a very simple json > defining a two namespace subsystem backed by two real nvme devices: Cool right, thanks for the tip, I should have thought of that. I just did some more loop testing with your patch and it behaves roughly as we expect. The controller and subsystem IDs never overlap unless they are created at the same time and it doesn't look like any IDs are ever leaked. With simple non-CMIC devices the ctrl and subsystem always have the same instance number. Logan