From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53985 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrttG-0000hT-MK for qemu-devel@nongnu.org; Tue, 22 Feb 2011 10:11:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrttF-0005Nx-Ln for qemu-devel@nongnu.org; Tue, 22 Feb 2011 10:11:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrttF-0005Nh-8z for qemu-devel@nongnu.org; Tue, 22 Feb 2011 10:11:01 -0500 Message-ID: <4D63D217.9080206@redhat.com> Date: Tue, 22 Feb 2011 16:11:19 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] For AIO return -ENOSPC on short write References: <1298369880-23859-1-git-send-email-Jes.Sorensen@redhat.com> <1298369880-23859-2-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: hch@infradead.org, Jes.Sorensen@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 22.02.2011 16:02, schrieb Stefan Hajnoczi: > On Tue, Feb 22, 2011 at 10:18 AM, wrote: >> + else if ((laiocb->type == QEMU_AIO_WRITE) && (ret >= 0) && >> + (ret < laiocb->nbytes)) >> + ret = -ENOSPC; > > Why is write special? I think we need the change reads, too. However not to return ENOSPC, but to return zeros instead (this is what the synchronous raw_read does, and pwrite relies on it - once we make pwrite async, we'll need this). > Why are we even allowing requests that extend beyond the end of the > device? Is the LVM volume marked growable in the QEMU block layer? Might well be a qcow2 on LVM case that Jes was debugging. Kevin