Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11175699ybi; Thu, 25 Jul 2019 11:17:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9urOmkN+2rcMP+SbG16iU4y8xPAEjkVDzziwaQLYBUJMhA5kQ7pNFLbdz4/oTHYzTFOxX X-Received: by 2002:a62:1a8e:: with SMTP id a136mr17703662pfa.22.1564078621242; Thu, 25 Jul 2019 11:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564078621; cv=none; d=google.com; s=arc-20160816; b=MqYeUBBjNP38gnBpCR34+2a6nfsJ/8if55va0INAhvohlX56jdEtmXiPqEINKqs2VL NLdm0EnD+oygudGZqqXEVt4DfTZ2REUdohJxQ+XgJpUqHkVthudmiFhjmv1RDMi2V+ck gw8UZW/yvkdI1qA7fWHsr985upbhj9JPDrtLPQtVVjVFgUAoYOzIwpkr9MNpEYdZnsbt pJIT5tTrb7IqkELyQBTFzRjvDz67U8vH7sexN/s0uxDmkpbD2i6toyk0zkCGIZFexWWo dcQsj//FTnydsZ/fHAol4NVnBPqOVAXZz7z6ZQQq4G+T1EsDuDx3URLa3RztVzUVawS1 S/aw== 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:dkim-signature; bh=rkgx4qE3DnVHSOLYTvGGkPMYQkZOobBLqaCkt0O9/jQ=; b=Hj66bbPNEijnbskJyzRGOBoLvBPaD3hFQZrhCEvEam0lhwTJvkoTBbPKjani1uceIG GuHXQEs4+sLI6MuTKx1RmPblNP/hJ3y9pQSoGmMVViksqMlrJ3QWHmYTidcrIFXujG/S gnBdT+sF4wbVbOMd41nM1JebiuNegA5tCsZPqvchHhAJNz/wdE5lWLSeOHGs1K44/Yl4 /6rc+Z7AaTfA5jj+GvYkkmiNPcthDd8rwFuScN3BvRuUQ1z35zELOTlDjK/AgmSvnyY8 AN07lDx5IqkUAdukiPt+cvBWsZ9zuAzTLzskphsfhiHae0L3G3jfB5wsOmmyXsvMaWl1 +o5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oA295ozA; 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 l2si17706556pff.221.2019.07.25.11.16.45; Thu, 25 Jul 2019 11:17:01 -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=pass header.i=@kernel.org header.s=default header.b=oA295ozA; 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 S1727506AbfGYSIU (ORCPT + 99 others); Thu, 25 Jul 2019 14:08:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:52496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726300AbfGYSIT (ORCPT ); Thu, 25 Jul 2019 14:08:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0BE45218F0; Thu, 25 Jul 2019 18:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564078098; bh=KiiFegUHU5GPihsnRiipJWlk+KirWCXeCrKP7PJ9rpc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oA295ozAwbkkLgAao5fN+JRSaJrf6L0LtcY2aIsVs0zCTwQM8QLvcoR8WRWwy1so+ mwzUu3WkwpFOFBjZRDEAf6HHDVMsAeyHgloYzHJbK820PXzKfUm1RJHEcE0XsUrf/z f9CpVOxFp+taewZCX44SLRKoCnk4t3R7S7hi27bY= Date: Thu, 25 Jul 2019 20:08:16 +0200 From: Greg Kroah-Hartman To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Keith Busch , Jens Axboe , Chaitanya Kulkarni , Max Gurtovoy , Stephen Bates , Alexander Viro Subject: Re: [PATCH v6 02/16] chardev: introduce cdev_get_by_path() Message-ID: <20190725180816.GA32305@kroah.com> References: <20190725172335.6825-1-logang@deltatee.com> <20190725172335.6825-3-logang@deltatee.com> <20190725174032.GA27818@kroah.com> <682ff89f-04e0-7a94-5aeb-895ac65ee7c9@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <682ff89f-04e0-7a94-5aeb-895ac65ee7c9@deltatee.com> User-Agent: Mutt/1.12.1 (2019-06-15) 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 11:53:20AM -0600, Logan Gunthorpe wrote: > > > On 2019-07-25 11:40 a.m., Greg Kroah-Hartman wrote: > > On Thu, Jul 25, 2019 at 11:23:21AM -0600, Logan Gunthorpe wrote: > >> cdev_get_by_path() attempts to retrieve a struct cdev from > >> a path name. It is analagous to blkdev_get_by_path(). > >> > >> This will be necessary to create a nvme_ctrl_get_by_path()to > >> support NVMe-OF passthru. > > > > Ick, why? Why would a cdev have a "pathname"? > > So we can go from "/dev/nvme0" (which points to a char device) to its > struct cdev and eventually it's struct nvme_ctrl. Doing it this way also > allows supporting symlinks that might be created by udev rules. Why do you have a "string" within the kernel and are not using the normal open() call from userspace on the character device node on the filesystem in your namespace/mount/whatever? Where is this random string coming from? Why is this so special that no one else has ever needed it? thanks, greg k-h