minor cleanup from https://github.com/daald/NBDServer excellent write patches