Skip to content

Lots of NBD fixes and enhancements

Josef Bacik linux-block 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6nbd: handle single path failures gracefullydrivers/block/nbd.c+124 -410 replies
2/6nbd: ref count the nbd devicedrivers/block/nbd.c+133 -770 replies
3/6nbd: stop using the bdev everywheredrivers/block/nbd.c+39 -540 replies
4/6nbd: set queue timeout properlydrivers/block/nbd.c+4 -10 replies
5/6nbd: handle ERESTARTSYS properlydrivers/block/nbd.c+116 -220 replies
6/6nbd: add a basic netlink interfacedrivers/block/nbd.c include/uapi/linux/nbd-netlink.h+354 -433 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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 can tear down a whole device if a userspace app has a signal pending while submitting IO. This is big and scary but I had a debug patch on top of this to randomly induce ERESTARTSYS to make sure it was behaving properly.

ENHANCEMENTS:

1) Handle signle path failures gracefully. This is the first step to handling reconnects gracefully, but for right now we can easily fall back on other connections if we happen to lose one connection.

2) Ref counting and bdev change. This is in preparation for the netlink patch and handling reconnects and the such better.

3) Netlink interface. Trying to add the nbd-control thing was controversial, and I realized the more I wanted to do with monitoring and stuff I would need to use netlink for anyway. With this new interface we can easily configure and disconnect devices, dynamically add devices if we are past our pre-allocated limit, and dynamically find free devices to use if we don't want to try and hunt for a device. The userspace patch to utilize this is kind of rough but can be found in my github tree

https://github.com/josefbacik/nbd

These have been pretty well tested, but I'd like to hear any thoughts on the new interface. Thanks,

Josef