Received: from eggs.gnu.org ([2001:4830:134:3::10]:41295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2EJb-00046V-LJ for qemu-devel@nongnu.org; Wed, 02 Jul 2014 02:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2EJU-0001rA-6D for qemu-devel@nongnu.org; Wed, 02 Jul 2014 02:46:47 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:53384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2EJU-0001qR-08 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 02:46:40 -0400 From: Markus Armbruster References: <1403889855-5740-1-git-send-email-armbru@redhat.com> <1403889855-5740-3-git-send-email-armbru@redhat.com> <53B2C8C0.6030303@gmail.com> <53B2E5D9.9040606@redhat.com> Date: Wed, 02 Jul 2014 08:46:34 +0200 In-Reply-To: <53B2E5D9.9040606@redhat.com> (Paolo Bonzini's message of "Tue, 01 Jul 2014 18:46:17 +0200") Message-ID: <87ha30l0l1.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 2.1 2/3] blockjob: Fix recent BLOCK_JOB_ERROR regression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, lcapitulino@redhat.com, Wenchao Xia , stefanha@redhat.com, qemu-devel@nongnu.org Paolo Bonzini writes: > Il 01/07/2014 16:42, Wenchao Xia ha scritto: >>> diff --git a/qapi/block-core.json b/qapi/block-core.json >>> index 822fe16..fd5b579 100644 >>> --- a/qapi/block-core.json >>> +++ b/qapi/block-core.json >>> @@ -1544,7 +1544,7 @@ >>> { 'event': 'BLOCK_JOB_ERROR', >>> 'data': { 'device' : 'str', >>> 'operation': 'IoOperationType', >>> - 'action' : 'BlockdevOnError' } } >>> + 'action' : 'BlockErrorAction' } } >>> >> It is my mistake to use BlockdevOnError in code incorrectly. >> The define as 'BlockdevOnError' before is on purpose, since the >> doc for 'BlockErrorAction' says: stop means a VM is stoped, but >> for block-job it is not true, so I chosed a different type, and >> 'BlockdevOnError' seems the right one(see the doc for it). We can >> fix it in C caller or add doc in .json file later. > > I think consistency between BLOCK_IO_ERROR and BLOCK_JOB_ERROR is > better. Moreover, BlockdevOnError's enospc is meaningless here. > Let's fix the BlockErrorAction documentation instead. I didn't quite understand what's wrong with it; I expect a patch will enlighten me :)