From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1zGJ-0003Ka-QH for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1zGD-0007Ns-OM for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:42:23 -0400 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:59942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1zGD-0007Nh-H6 for qemu-devel@nongnu.org; Tue, 01 Jul 2014 10:42:17 -0400 Received: by mail-pd0-f171.google.com with SMTP id fp1so10229765pdb.30 for ; Tue, 01 Jul 2014 07:42:16 -0700 (PDT) Message-ID: <53B2C8C0.6030303@gmail.com> Date: Tue, 01 Jul 2014 22:42:08 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1403889855-5740-1-git-send-email-armbru@redhat.com> <1403889855-5740-3-git-send-email-armbru@redhat.com> In-Reply-To: <1403889855-5740-3-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit 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: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, lcapitulino@redhat.com ÓÚ 2014/6/28 1:24, Markus Armbruster дµÀ: > Commit 5a2d2cb screwed up the the value of members device and action, > breaking tests/qemu-iotests/041. > > Signed-off-by: Markus Armbruster > Tested-By: Benoit Canet > Reviewed-by: Kevin Wolf > Reviewed-by: Luiz Capitulino > --- > blockjob.c | 2 +- > qapi/block-core.json | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/blockjob.c b/blockjob.c > index 37a8f1f..4d8ff45 100644 > --- a/blockjob.c > +++ b/blockjob.c > @@ -286,7 +286,7 @@ BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs, > default: > abort(); > } > - qapi_event_send_block_job_error(bdrv_get_device_name(bs), > + qapi_event_send_block_job_error(bdrv_get_device_name(job->bs), > is_read ? IO_OPERATION_TYPE_READ : > IO_OPERATION_TYPE_WRITE, > action, &error_abort); > 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 am occupied by other things these days, thanks for fixing the bugs introduced by me! > ## > # @BLOCK_JOB_READY >