NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
450 stars 116 forks source link

Don't set unset (zero) timeout in nbd-client when configuring via netlink #82

Closed maciejsszmigiero closed 6 years ago

maciejsszmigiero commented 6 years ago

When we are operating as a daemon we ignore unset (zero) timeout in set_timeout() and don't set it in kernel. However, when operating in the netlink mode netlink_configure() will add NBD_ATTR_TIMEOUT attribute unconditionally.

This means that in the default case of timeout being unset it was being set to zero in the kernel which resulted in it triggering almost immediately upon any I/O request.

Fix this by not appending the timeout attribute in netlink_configure() when the timeout is unset.

This should fix #71