nbd-netlink supports setting up an NBD device for a specified socket and
parameters, using the Linux kernel's netlink interface to NBD. Unlike the
ioctl-based interface, the netlink interface can hand off a socket to the
kernel without leaving a thread or process running.
Example
use ;
use ;
let nbd_socket = connect?;
nbd_socket.set_nodelay;
let mut nbd = NBDnew?;
let index = new
.size_bytes
.read_only
.connect?;