Ho hum. On Thu, 2011-02-17 at 16:34 +0000, Nicholas Thomas wrote: > Signed-off-by: Nick Thomas <n...@bytemark.co.uk> > --- > block/nbd.c | 549 > ++++++++++++++++++++++++++++++++++++++++++++++++++--------- > 1 files changed, 464 insertions(+), 85 deletions(-)
Additional testing has revealed that this code breaks the stock nbd-server (the one on sourceforge) when large (well, 1.3MiB) write requests are sent to it. The server process receives a valid-looking NBD write request header followed by the first ~200K of the write data (sent from add_aio_request). It then exits (errcode 1). add_aio_request returns the error, and subsequently, read_aio_response picks up the aioreq and loops forever, trying to read a response from a closed socket. Reads and small writes seem to work fine, however. I'll debug the server tomorrow and try to see what's breaking it - no good having a technically compliant client if it breaks the most common server out there ;) /Nick