... otherwise it can freeze the whole os so it it use several minutes to shut down =|
also it should use it's own open() handle, not the open() handle used by the NBD_DOIT thread... (that's how they do it at least, https://github.com/NetworkBlockDevice/nbd/blob/master/nbd-client.c )