All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>, Alex Bligh <alex@alex.org.uk>
Cc: "nbd-general@lists.sourceforge.net"
	<nbd-general@lists.sourceforge.net>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Josef Bacik <jbacik@fb.com>,
	Jens Axboe <axboe@fb.com>, Kernel Team <Kernel-team@fb.com>,
	Alex Gartrell <agartrell@fb.com>
Subject: Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface
Date: Wed, 25 Jan 2017 15:36:20 -0600	[thread overview]
Message-ID: <68e14c2e-e96e-ff8d-bd8a-0754fb970e77@redhat.com> (raw)
In-Reply-To: <20170125213004.GA6141@kroah.com>


[-- Attachment #1.1: Type: text/plain, Size: 1276 bytes --]

On 01/25/2017 03:30 PM, Greg KH wrote:
>> Given (because of NBD_DO_IT) we need an ioctl anyway, and we have
>> an ioctl that isn't going to go away, it would seem better if possible
>> to stick with ioctls, and not introduce either a dependency
>> on netlink (which would presumably bloat static binaries that
>> are used early in the boot process). Personally I'd have thought
>> adding a new NBD ioctl (or extending an existing one) would be
>> less entropy than adding a new char device.
> 
> Why can't you just do this on any existing nbd block device with an
> ioctl to it?  No need to have to do it on an out-of-band char device
> node, right?

How do you get an fd to existing nbd block device?  Your intent is to
use an ioctl to request creating/opening a new nbd device that no one
else is using; opening an existing device in order to send that ioctl
may have negative ramifications to the actual user of that existing
device, if not permissions issues that prevent the open from even
happening.  Having a separate control fd makes it obvious that you are
asking for a new nbd device, and don't want to stomp on any existing
devices.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-01-25 21:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 21:56 [PATCH 1/4] nbd: use our own workqueue for recv threads Josef Bacik
2017-01-20 21:56 ` [PATCH 2/4] miscdevice: add a minor number for nbd-control Josef Bacik
2017-01-21  9:03   ` Greg KH
2017-01-21 13:25     ` Josef Bacik
2017-01-22 11:09       ` Greg KH
2017-01-20 21:56 ` [PATCH 3/4] nbd: use an idr to keep track of nbd devices Josef Bacik
2017-01-20 21:56 ` [PATCH 4/4] nbd: add a nbd-control interface Josef Bacik
2017-01-21  9:05   ` Greg KH
2017-01-23 14:42     ` Josef Bacik
2017-01-23 14:52       ` Greg KH
2017-01-23 14:57         ` Josef Bacik
2017-01-23 15:03           ` Greg KH
2017-01-23 15:52             ` Josef Bacik
2017-01-24  7:11               ` Greg KH
2017-01-25  8:55                 ` [Nbd] " Wouter Verhelst
2017-01-25 13:47                 ` Josef Bacik
2017-01-25 14:23                   ` Arnd Bergmann
2017-01-25 16:48                     ` Alex Gartrell
2017-01-25 18:21                       ` [Nbd] " Wouter Verhelst
2017-01-25 18:25                       ` Alex Bligh
2017-01-25 21:30                         ` Greg KH
2017-01-25 21:36                           ` Eric Blake [this message]
2017-01-26  8:40                             ` Christoph Hellwig
2017-01-26  9:17                               ` Greg KH
2017-01-26 13:17                                 ` Christoph Hellwig
2017-01-25 18:24                     ` Paul Clements
2017-01-21 12:11   ` Wouter Verhelst
2017-01-21 13:44     ` Josef Bacik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68e14c2e-e96e-ff8d-bd8a-0754fb970e77@redhat.com \
    --to=eblake@redhat.com \
    --cc=Kernel-team@fb.com \
    --cc=agartrell@fb.com \
    --cc=alex@alex.org.uk \
    --cc=arnd@arndb.de \
    --cc=axboe@fb.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbacik@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=nbd-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.