[Nbd] [PATCH 5/6] nbd: handle ERESTARTSYS properly

2017-02-28 Thread Josef Bacik
We can submit IO in a processes context, which means there can be pending signals. This isn't a fatal error for NBD, but it does require some finesse. If the signal happens before we transmit anything then we are ok, just requeue the request and carry on. However if we've done a partial

[Nbd] [PATCH 6/6] nbd: add a basic netlink interface

2017-02-28 Thread Josef Bacik
The existing ioctl interface for configuring NBD devices is a bit cumbersome and hard to extend. The other problem is we leave a userspace app sitting in it's syscall until the device disconnects, which is less than ideal. This patch introduces a netlink interface for adding and disconnecting

[Nbd] [PATCH 3/6] nbd: stop using the bdev everywhere

2017-02-28 Thread Josef Bacik
In preparation for the upcoming netlink interface we need to not rely on already having the bdev for the NBD device we are doing operations on. Instead of passing the bdev around, just use it in places where we know we already have the bdev. Signed-off-by: Josef Bacik ---

[Nbd] [PATCH 2/6] nbd: ref count the nbd device

2017-02-28 Thread Josef Bacik
In preparation for seamless reconnects and the netlink configuration interface we need a way to make sure our nbd device configuration doesn't disappear until we are finished with it. So add a ref counter, and on the final put we do all of the cleanup work on the nbd device. At configuration time

[Nbd] [PATCH 4/6] nbd: set queue timeout properly

2017-02-28 Thread Josef Bacik
We can't just set the timeout on the tagset, we have to set it on the queue as it would have been setup already at this point. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/block/nbd.c

[Nbd] [PATCH 0/6] Lots of NBD fixes and enhancements

2017-02-28 Thread Josef Bacik
This is kind of a big batch of patches, but they all depend on eachother so it was hard to tease out the fixes from the enhancements without making my life miserable. FIXES: nbd: set queue timeout properly nbd: handle ERESTARTSYS properly The ERSTARTSYS one in particular is pretty awful as we

[Nbd] Best Of February Is Here

2017-02-28 Thread Alisha Gill