• J
    nbd: add a basic netlink interface · e46c7287
    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 devices.  This has the benefits of being easily extendable without
    breaking older userspace applications, and allows us to configure a nbd
    device without leaving a userspace app sitting waiting for the device to
    disconnect.
    
    With this interface we also gain the ability to configure more devices
    than are preallocated at insmod time.  We also have gained the ability
    to not specify a particular device and be provided one for us so that
    userspace doesn't need to find a free device to configure.
    Signed-off-by: NJosef Bacik <jbacik@fb.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    e46c7287
nbd-netlink.h 1.7 KB