Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11218701ybi; Thu, 25 Jul 2019 12:06:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwreWe/zVKqo1GL0CePZkp2d7JXfcRWvSlsvKUMs2KrxSaBMNpOqSDxV3vkghzSIn9NV3DF X-Received: by 2002:a17:90a:380d:: with SMTP id w13mr92444929pjb.138.1564081609243; Thu, 25 Jul 2019 12:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564081609; cv=none; d=google.com; s=arc-20160816; b=Qa0abg4XGWUNDKC+e5iGFl2rBaFz3IKEJNuOHMdC0C2b5wUW8MfQC7tHit0H11QVaH avEkKf1tKY34rCIr1JlXC9Qm0lm54ui46b6wx1/I2phkN/7sLLZnGi+qe0SUPiPByoTP eKCLGwGjHS16Oy5MaMOL/4rrCBHbApLHGXJ23gF17EGJYAGgV1bIpNTe9oS5TdCMPL+q MngM8MDestYDSvtadWp78Pi4lRQ5ZwS/5uIdWCGglxyD7pxFBZy8PWfQjbxBWEZ+3Pnw gOzlujiFlTA/qW4RaGtC/hL9NM/gyKHaUJ5M5GwNsGzCE5Cp6MBj2F5RlkJ5oNrglqFZ NE1g== 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=Vw35ctnHAyiweCYFIr8Q5tQ1sCTMUrzhYWyZVMQ2srE=; b=dy8ydfY9Yz4xijIOWayrOHeh70H7mT5LggXKCU6fxhAzOQW9CpO3Y8OrwRD6cRqLwU RKB0j43zUUUjKCTZI2IaAilKiGh3N6e2cKaorYy9qWs/pQQ2pDkxhFOG0fjnk8Mj6OIC YvLfpJYH+HVGbEMKDUuzHsJRN//KTjhHAIiAXrQYdA3gnUMMeWyaJhwYjXkU1vIzojJ8 ByaJRoIgKL7ulbzJdgCzunUN60tDUGO5kU9EjzXkKhbhXEbXljCXogiVkSYiNHRO6/Ag zN+T81ePdE+Ca2WsismXwAEAy+RzKeuW3KW4gJyjpGkfbOXSIDoLGVlFDPFfnSSedAEP GoaA== 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 s19si18413016pgs.106.2019.07.25.12.06.34; Thu, 25 Jul 2019 12:06:49 -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 S1726618AbfGYTFw (ORCPT + 99 others); Thu, 25 Jul 2019 15:05:52 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:35167 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfGYTFw (ORCPT ); Thu, 25 Jul 2019 15:05:52 -0400 Received: by mail-ot1-f68.google.com with SMTP id j19so14313098otq.2; Thu, 25 Jul 2019 12:05:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Vw35ctnHAyiweCYFIr8Q5tQ1sCTMUrzhYWyZVMQ2srE=; b=PfoBHShhlyrT2DkUHewHf0gjDwYJ6MWQCgL3warjeUrra/7DhqZN+5v40UA2hu2Q9J goQvRrNZUSB6Q0H0nmF9cBD5+iZohXVb+2UxFOo5E1hR+gxkxOl5XaFP0dgPHRjcLPs1 nSx9xplYcuBw6NB96XrgErw/vxIB+qDm6uL2srJYG0Iu2hdheYEYfA7o67orzqwmLZl8 kY/qO38Tp15EWHneKN3SqykJCTF5qJnpAW6Tbeb4p+sxijOHZSpNRrWQwx3anEOyiZg1 8gXj3hKuyQGJiOZAFsLDL1ssQ7KrwCu9PUeBiENubKIvaib/FMgxJxSt7htoDalXxLso GF+w== X-Gm-Message-State: APjAAAWL4bIqu9CJ1/UeQIOz78or3rKv5B6BTD0/bAd2gtRY6l0AZe2j zkn1TuiWFiyyQn8M5rvoBag= X-Received: by 2002:a9d:7:: with SMTP id 7mr68886666ota.248.1564081550962; Thu, 25 Jul 2019 12:05:50 -0700 (PDT) Received: from [192.168.1.114] (162-195-240-247.lightspeed.sntcca.sbcglobal.net. [162.195.240.247]) by smtp.gmail.com with ESMTPSA id u16sm16785232otk.46.2019.07.25.12.05.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 12:05:50 -0700 (PDT) Subject: Re: [PATCH v6 02/16] chardev: introduce cdev_get_by_path() To: Matthew Wilcox , Greg Kroah-Hartman Cc: Jens Axboe , Chaitanya Kulkarni , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Stephen Bates , linux-block@vger.kernel.org, Keith Busch , Alexander Viro , linux-fsdevel@vger.kernel.org, Max Gurtovoy , Logan Gunthorpe , Christoph Hellwig References: <20190725172335.6825-1-logang@deltatee.com> <20190725172335.6825-3-logang@deltatee.com> <20190725174032.GA27818@kroah.com> <682ff89f-04e0-7a94-5aeb-895ac65ee7c9@deltatee.com> <20190725180816.GA32305@kroah.com> <20190725182701.GA11547@kroah.com> <20190725190024.GD30641@bombadil.infradead.org> From: Sagi Grimberg Message-ID: <27943e06-a503-162e-356b-abb9e106ab2e@grimberg.me> Date: Thu, 25 Jul 2019 12:05:29 -0700 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: <20190725190024.GD30641@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> NVMe-OF is configured using configfs. The target is specified by the >>> user writing a path to a configfs attribute. This is the way it works >>> today but with blkdev_get_by_path()[1]. For the passthru code, we need >>> to get a nvme_ctrl instead of a block_device, but the principal is the same. >> >> Why isn't a fd being passed in there instead of a random string? > > I suppose we could echo a string of the file descriptor number there, > and look up the fd in the process' file descriptor table ... Assuming that there is a open handle somewhere out there... > I'll get my coat. Grab mine too..