From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR2Fd-0001If-KG for qemu-devel@nongnu.org; Mon, 08 Sep 2014 12:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XR2FX-0005SJ-CH for qemu-devel@nongnu.org; Mon, 08 Sep 2014 12:57:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XR2FX-0005Ry-45 for qemu-devel@nongnu.org; Mon, 08 Sep 2014 12:57:07 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s88Gv5n8005971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 8 Sep 2014 12:57:06 -0400 Date: Mon, 8 Sep 2014 12:57:01 -0400 From: Luiz Capitulino Message-ID: <20140908125701.3be785e9@redhat.com> In-Reply-To: <20140908153318.GH4297@noname.redhat.com> References: <20140829160727.69f66ecd@redhat.com> <20140908104217.48f2354a@redhat.com> <20140908153318.GH4297@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: fromani@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On Mon, 8 Sep 2014 17:33:18 +0200 Kevin Wolf wrote: > Am 08.09.2014 um 16:42 hat Luiz Capitulino geschrieben: > > On Fri, 29 Aug 2014 16:07:27 -0400 > > Luiz Capitulino wrote: > > > > > Management software, such as RHEV's vdsm, want to be able to allocate > > > disk space on demand. The basic use case is to start a VM with a small > > > disk and then the disk is enlarged when QEMU hits a ENOSPC condition. > > > > > > To this end, the management software has to be notified when QEMU > > > encounters ENOSPC. The solution implemented by this commit is simple: > > > it extends the BLOCK_IO_ERROR with a 'nospace' key, which is true > > > when QEMU is stopped due to ENOSPC. > > > > > > Note that support for querying this event is already present in > > > query-block by means of the 'io-status' key. Also, the new 'nospace' > > > BLOCK_IO_ERROR field shares the same semantics with 'io-status', > > > which basically means that werror= has to be set to either > > > 'stop' or 'enospc' to enable 'nospace'. > > > > > > Finally, this commit also updates the 'io-status' key doc in the > > > schema with a list of supported device models. > > > > > > Signed-off-by: Luiz Capitulino > > > > Kevin, are you going to take this via block layer tree? > > Yes, thanks, I've applied it now. > > What was our conclusion wrt the human-readable strerror() string for > debugging? Didn't we want to add that as well? I can do it on top of this patch. So, just adding a new field for this is fine? > > > > --- > > > > > > Three important observations: > > > > > > 1. We've talked with oVirt and OpenStack folks. oVirt folks say that > > > this implementation is enough for their use-case. OpenStack don't > > > need this feature > > > > > > 2. While testing this with a raw image on a (smaller) ext2 file mounted > > > via the loopback device, I get half "Invalid argument" I/O errors and > > > half "No space" errors". This means that half of the BLOCK_IO_ERROR > > > events that are emitted for this test-case will have nospace=false > > > and the other half nospace=true. I don't know why I'm getting those > > > "Invalid argument" errors, can anyone of the block layer comment > > > on this? I don't get that with a qcow2 image (I get nospace=true for > > > all events) > > Sounds familiar, but I never got around to debugging. Would probably be > worth some digging where the EINVAL comes from. > > > > 3. I think this should go via block tree > > > > > > block.c | 22 ++++++++++++++-------- > > > qapi/block-core.json | 8 +++++++- > > > 2 files changed, 21 insertions(+), 9 deletions(-) > > Kevin >