Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11293823ybi; Thu, 25 Jul 2019 13:35:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxheIV8Ln+a17fX8cy9YZFZzdRJ5oq0Xz6wMokD5S83MJ6Nl3I0PeAAn8hYbxwZ+RgMDx83 X-Received: by 2002:a62:cec4:: with SMTP id y187mr18287368pfg.84.1564086917209; Thu, 25 Jul 2019 13:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564086917; cv=none; d=google.com; s=arc-20160816; b=pJbF9F0pHs3dgLOjcr6xv5yvrsBu6qAEloKo3g0YiuEDh9R/jnymzbEIoP1j5GhPTK M968bvxclfMpM/2U5Vdt6A1p1brq2waFDvVI9JmtyI/mouXmPMX76NfJ+DpIAzl59C02 6tuw9ZTf9UvzOO1J1DZcxGieg/4c/crBCbcvUswjyfNDTqkjXl0rOTwi/2Y+bVTWH5Gz 68CrE3s055pcZxb9wEGX+TrBzSljibei1/bZIC0EY5ohG8hTaSmeaqxJoxKzZFAckwzq Hxh7rcWehSToPaX/d+GcfrXlbSf5ExPhYy9+zPCKFlStC88OPASpWNCjSidFLFLDVjCk qLgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lYd+ML1wWjF+ilsquD1L6qhPBf7K7yeEnxN0oQmBoLI=; b=kUX/NOd82JTY6GXGyricFYJR3a71q0B5qyMY/V2ngCWZK860R7YEcDlNeRCJtQsnl4 SVFmLlr/XqtMjjJ/Kk8QKNSXpc5zsnrFMHXWTlOkiPkByvPDAc9mWuiJESeQ2tcktLWs qx0tv59AVueXFbIgIOJcPUfP/tNuqQHcw4zhsXJNX+LtugEvucDW7QdjO3aSj3cTMAMd vF7GuLTPykn+uoE2t+SjPkQrIidmPJ9bjNKwaG+hbwBbAG+mZPmWyVQ/DKj610P6QhEM wIRgA6Wu38TR5o23npOv1WSH4oZ48Q/aSZc4nHB8qoScfBsBcO1NrXkuAPd+24HPl+f5 QDKQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si15213033pjq.71.2019.07.25.13.35.01; Thu, 25 Jul 2019 13:35:17 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbfGYUeP (ORCPT + 99 others); Thu, 25 Jul 2019 16:34:15 -0400 Received: from mga05.intel.com ([192.55.52.43]:29092 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbfGYUeN (ORCPT ); Thu, 25 Jul 2019 16:34:13 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 13:34:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="345618092" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga005.jf.intel.com with ESMTP; 25 Jul 2019 13:34:11 -0700 Date: Thu, 25 Jul 2019 14:31:18 -0600 From: Keith Busch To: Logan Gunthorpe Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Jens Axboe , Chaitanya Kulkarni , Max Gurtovoy , Stephen Bates Subject: Re: [PATCH v6 04/16] nvme-core: introduce nvme_get_by_path() Message-ID: <20190725203118.GB7317@localhost.localdomain> References: <20190725172335.6825-1-logang@deltatee.com> <20190725172335.6825-5-logang@deltatee.com> <20190725175023.GA30641@bombadil.infradead.org> <20190725195835.GA7317@localhost.localdomain> <5dd6a41d-21c4-cf8d-a81d-271549de6763@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5dd6a41d-21c4-cf8d-a81d-271549de6763@deltatee.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 25, 2019 at 02:28:28PM -0600, Logan Gunthorpe wrote: > > > On 2019-07-25 1:58 p.m., Keith Busch wrote: > > On Thu, Jul 25, 2019 at 11:54:18AM -0600, Logan Gunthorpe wrote: > >> > >> > >> On 2019-07-25 11:50 a.m., Matthew Wilcox wrote: > >>> On Thu, Jul 25, 2019 at 11:23:23AM -0600, Logan Gunthorpe wrote: > >>>> nvme_get_by_path() is analagous to blkdev_get_by_path() except it > >>>> gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0). > >>>> > >>>> The purpose of this function is to support NVMe-OF target passthru. > >>> > >>> I can't find anywhere that you use this in this patchset. > >>> > >> > >> Oh sorry, the commit message is out of date the function was actually > >> called nvme_ctrl_get_by_path() and it's used in Patch 10. > > > > Instead of by path, could we have configfs take something else, like > > the unique controller instance or serial number? I know that's different > > than how we handle blocks and files, but that way nvme core can lookup > > the cooresponding controller without adding new cdev dependencies. > > Well the previous version of the patchset just used the ctrl name > ("nvme1") and looped through all the controllers to find a match. But > this sucks because of the inconsistency and the fact that the name can > change if hardware changes and the number changes. Allowing the user to > make use of standard udev rules seems important to me. Should we then create a new udev rule for persistent controller names? /dev/nvme1 may not be the same controller each time you refer to it.