From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44182 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq9WY-0007xG-Ao for qemu-devel@nongnu.org; Thu, 17 Feb 2011 14:28:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pq9WW-0004gD-8O for qemu-devel@nongnu.org; Thu, 17 Feb 2011 14:28:22 -0500 Received: from nog.sh.bytemark.co.uk ([212.110.161.168]:34261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pq9WW-0004fb-3j for qemu-devel@nongnu.org; Thu, 17 Feb 2011 14:28:20 -0500 Subject: Re: [Qemu-devel] [PATCH 3/3] block/nbd: Make the NBD block device use the AIO interface From: Nicholas Thomas In-Reply-To: <1297960482.21300.62.camel@desk4.office.bytemark.co.uk> References: <1297712422.12551.2.camel@den> <4D5A5ECD.7060701@redhat.com> <1297805193.12551.39.camel@den> <4D5BBC7B.9020807@redhat.com> <1297960482.21300.62.camel@desk4.office.bytemark.co.uk> Content-Type: text/plain; charset="UTF-8" Date: Thu, 17 Feb 2011 19:28:37 +0000 Message-ID: <1297970917.12551.56.camel@den> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , qemu-devel@nongnu.org Ho hum. On Thu, 2011-02-17 at 16:34 +0000, Nicholas Thomas wrote: > Signed-off-by: Nick Thomas > --- > 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