Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-26 Thread Christoph Hellwig
On Thu, Jan 26, 2017 at 10:17:58AM +0100, Greg KH wrote: > Ok, but do you feel the "loop method" of using a char device node to > create/control these devices is a good model to follow for new devices > like ndb? Yes. We've done the same for NVMe over fabrics. -- To unsubscribe from this list:

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-26 Thread Christoph Hellwig
On Wed, Jan 25, 2017 at 03:36:20PM -0600, Eric Blake wrote: > 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

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Eric Blake
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

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Greg KH
On Wed, Jan 25, 2017 at 06:25:11PM +, Alex Bligh wrote: > > > On 25 Jan 2017, at 16:48, Alex Gartrell wrote: > > > > > > If nbd were *all* netlink I think that that'd be fine, but you'd have > > problems implementing the NBD_DOIT function in that fashion. So I'd > >

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Alex Bligh
> On 25 Jan 2017, at 16:48, Alex Gartrell wrote: > > > If nbd were *all* netlink I think that that'd be fine, but you'd have > problems implementing the NBD_DOIT function in that fashion. So I'd > rather stick to the char device ioctl thing because it's more > consistent

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Paul Clements
On Wed, Jan 25, 2017 at 9:23 AM, Arnd Bergmann wrote: > > They all have their own set of problems, but the needs of nbd as a network > storage interface seem most closely resemble what we have for other network > related interfaces, where we typically use netlink to do the setup,

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Wouter Verhelst
On Wed, Jan 25, 2017 at 04:48:27PM +, Alex Gartrell wrote: > On 1/25/17, 6:23 AM, "arndbergm...@gmail.com on behalf of Arnd Bergmann" > wrote: > > We have multiple established ways to deal with this kind of problem, the > > most > > common

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-25 Thread Wouter Verhelst
On Tue, Jan 24, 2017 at 08:11:52AM +0100, Greg KH wrote: > On Mon, Jan 23, 2017 at 10:52:42AM -0500, Josef Bacik wrote: > > I explained it in the changelog and my response to Wouter. NBD preallocates > > all of its /dev/nbd# devices at modprobe time, so there's no way to add new > > devices as we

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-21 Thread Josef Bacik
> On Jan 21, 2017, at 7:12 AM, Wouter Verhelst wrote: > >> On Fri, Jan 20, 2017 at 04:56:52PM -0500, Josef Bacik wrote: >> This patch mirrors the loop back device behavior with a few changes. First >> there is no DEL operation as NBD doesn't get as much churn as loop devices >>

Re: [Nbd] [PATCH 4/4] nbd: add a nbd-control interface

2017-01-21 Thread Wouter Verhelst
On Fri, Jan 20, 2017 at 04:56:52PM -0500, Josef Bacik wrote: > This patch mirrors the loop back device behavior with a few changes. First > there is no DEL operation as NBD doesn't get as much churn as loop devices do. > Secondly the GET_NEXT operation can optionally create a new NBD device or