Fix two recent event regressions
cover Fix two recent event regressions
This series plus Paolo's "[PATCH for 2.1] qdev: correctly send DEVICE_DELETED for recursively-deleted devices" makes qemu-iotests check -qcow2 again pass for me.
Luiz offered to take it through his tree.
Markus Armbruster (2):
blockjob: Fix recent BLOCK_JOB_READY regression
blockjob: Fix recent BLOCK_JOB_ERROR regression
blockjob.c | 8 ++++++-- qapi/block-core.json | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/2 blockjob: Fix recent BLOCK_JOB_READY regression
Commit bcada37 dropped the (undocumented) members type, len, offset, speed, breaking tests/qemu-iotests/040 and 041.
Restore them. This fixes 040, and partially fixes 041.
--- blockjob.c | 6 +++++- qapi/block-core.json | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)
blockjob.c +5 -1
@@ -256,7 +256,11 @@ void block_job_event_completed(BlockJob *job, const char *msg)void block_job_event_ready (BlockJob *job) { -qapi_event_send_block_job_ready (bdrv_get_device_name (job->bs), &error_abort); +qapi_event_send_block_job_ready (job->driver->job_type, +bdrv_get_device_name (job->bs), + job->len, + job->offset, + job->speed, &error_abort); } BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs,
qapi/block-core.json +5 -1
@@ -1559,4 +1559,8 @@ # Since: 1.3 ## { 'event': 'BLOCK_JOB_READY', - 'data': { 'device': 'str' } } + 'data': { 'type' : 'BlockJobType', + 'device': 'str', + 'len' : 'int', + 'offset': 'int', + 'speed' : 'int' } }
Signature · 1 line
1.9.3
PATCH 2/2 blockjob: Fix recent BLOCK_JOB_ERROR regression
In reply to Markus ArmbrusterCommit 5a2d2cb screwed up the the value of members device and action, breaking tests/qemu-iotests/041.
--- blockjob.c | 2 +- qapi/block-core.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
blockjob.c +1 -1
@@ -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);
qapi/block-core.json +1 -1
@@ -1544,7 +1544,7 @@ { 'event': 'BLOCK_JOB_ERROR', 'data': { 'device' : 'str', 'operation': 'IoOperationType', - 'action' : 'BlockdevOnError' } } + 'action' : 'BlockErrorAction' } } ## # @BLOCK_JOB_READY
Signature · 1 line
1.9.3
Quoted 6 lines · Markus Armbruster
This series plus Paolo's "[PATCH for 2.1] qdev: correctly send
DEVICE_DELETEDfor recursively-deleted devices" makes qemu-iotests check -qcow2 again pass for me.Luiz offered to take it through his tree.
Quoted 12 lines
Markus Armbruster (2):
blockjob: Fix recentBLOCK_JOB_READYregression
blockjob: Fix recentBLOCK_JOB_ERRORregressionblockjob.c | 8 ++++++-- qapi/block-core.json | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)Signature · 1 line
1.9.3
For what it worth.
Re: [Qemu-devel] [PATCH 2.1 1/2] blockjob: Fix recent BLOCK_JOB_READY regression
In reply to Markus ArmbrusterAm 27.06.2014 um 15:47 hat Markus Armbruster geschrieben:
Quoted 33 lines
Commit bcada37 dropped the (undocumented) members type, len, offset, speed, breaking tests/qemu-iotests/040 and 041.
Restore them. This fixes 040, and partially fixes 041.
Signed-off-by Markus Armbruster <[email protected]>--- blockjob.c | 6 +++++- qapi/block-core.json | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)blockjob.c +5
-1@@ -256,7 +256,11 @@ void block_job_event_completed(BlockJob *job, const char *msg)void block_job_event_ready (BlockJob *job) { -qapi_event_send_block_job_ready (bdrv_get_device_name (job->bs), &error_abort); +qapi_event_send_block_job_ready (job->driver->job_type, +bdrv_get_device_name (job->bs), + job->len, + job->offset, + job->speed, &error_abort); } BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs,qapi/block-core.json +0
-0
qapi/block-core.json line 1566
Quoted 9 lines
qapi/block-core.json +5
-1@@ -1559,4 +1559,8 @@ # Since: 1.3 ## { 'event': 'BLOCK_JOB_READY', - 'data': { 'device': 'str' } } + 'data': { 'type' : 'BlockJobType', + 'device': 'str', + 'len' : 'int', + 'offset': 'int', + 'speed' : 'int' } }
Please document the added fields in the comment above the definition.
Looks good otherwise.
Kevin
Re: [Qemu-devel] [PATCH 2.1 2/2] blockjob: Fix recent BLOCK_JOB_ERROR regression
In reply to Markus ArmbrusterAm 27.06.2014 um 15:47 hat Markus Armbruster geschrieben:
Quoted 4 lines
Commit 5a2d2cb screwed up the the value of members device and action, breaking tests/qemu-iotests/041.
Signed-off-by Markus Armbruster <[email protected]>
Re: [Qemu-devel] [PATCH 2.1 1/2] blockjob: Fix recent BLOCK_JOB_READY regression
In reply to Kevin WolfQuoted 39 lines · Kevin Wolf
Am 27.06.2014 um 15:47 hat Markus Armbruster geschrieben:
Quoted 38 lines
Commit bcada37 dropped the (undocumented) members type, len, offset, speed, breaking tests/qemu-iotests/040 and 041.
Restore them. This fixes 040, and partially fixes 041.
Signed-off-by Markus Armbruster <[email protected]>--- blockjob.c | 6 +++++- qapi/block-core.json | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)blockjob.c +5
-1@@ -256,7 +256,11 @@ void block_job_event_completed(BlockJob *job, const char *msg) void block_job_event_ready(BlockJob *job) { -qapi_event_send_block_job_ready (bdrv_get_device_name (job->bs), &error_abort); +qapi_event_send_block_job_ready (job->driver->job_type, +bdrv_get_device_name (job->bs), + job->len, + job->offset, + job->speed, &error_abort); }BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs,
qapi/block-core.json +0
-0@@ -1559,4 +1559,8 @@ # Since: 1.3 ## { 'event': 'BLOCK_JOB_READY',
Quoted 8 lines
qapi/block-core.json line 1566
Quoted 6 lines
qapi/block-core.json +5
-1- 'data': { 'device': 'str' } } + 'data': { 'type' : 'BlockJobType', + 'device': 'str', + 'len' : 'int', + 'offset': 'int', + 'speed' : 'int' } }Please document the added fields in the comment above the definition.
I hesistated, because it's not obvious to me whether we want all these members from a design point of view, and then I forgot in my haste to get the fix out.
Unwanted fields (if any) should be marked deprecated.
Anyway, I'll post a quick fix adding docs, for immediate commit. We can then discuss further doc changes. Plenty of time for those.
Quoted 1 line
Looks good otherwise.
Thanks!
Re: [Qemu-devel] [PATCH 2.1 1/2] blockjob: Fix recent BLOCK_JOB_READY regression
In reply to Kevin WolfQuoted 37 lines · On Fri, 27 Jun 2014 18:28:47 +0200 Kevin Wolf <[email protected]> wrote:
Am 27.06.2014 um 15:47 hat Markus Armbruster geschrieben:
Quoted 36 lines
Commit bcada37 dropped the (undocumented) members type, len, offset, speed, breaking tests/qemu-iotests/040 and 041.
Restore them. This fixes 040, and partially fixes 041.
Signed-off-by Markus Armbruster <[email protected]>--- blockjob.c | 6 +++++- qapi/block-core.json | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)blockjob.c +5
-1@@ -256,7 +256,11 @@ void block_job_event_completed(BlockJob *job, const char *msg)void block_job_event_ready (BlockJob *job) { -qapi_event_send_block_job_ready (bdrv_get_device_name (job->bs), &error_abort); +qapi_event_send_block_job_ready (job->driver->job_type, +bdrv_get_device_name (job->bs), + job->len, + job->offset, + job->speed, &error_abort); } BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs,qapi/block-core.json +0
-0@@ -1559,4 +1559,8 @@ # Since: 1.3 ## { 'event': 'BLOCK_JOB_READY',
Quoted 8 lines
qapi/block-core.json line 1566
Quoted 6 lines
qapi/block-core.json +5
-1- 'data': { 'device': 'str' } } + 'data': { 'type' : 'BlockJobType', + 'device': 'str', + 'len' : 'int', + 'offset': 'int', + 'speed' : 'int' } }Please document the added fields in the comment above the definition.
We have to add them to docs/qmp/qmp-events.txt too.
Markus, you can add a diff in this thread and I'll squash it with the patch.
Quoted 5 lines · On Fri, 27 Jun 2014 15:47:20 +0200 Markus Armbruster <[email protected]> wrote:
This series plus Paolo's "[PATCH for 2.1] qdev: correctly send
DEVICE_DELETEDfor recursively-deleted devices" makes qemu-iotests check -qcow2 again pass for me.Luiz offered to take it through his tree.
Kevin is going to take them via block tree:
Quoted 9 lines
Markus Armbruster (2):
blockjob: Fix recentBLOCK_JOB_READYregression
blockjob: Fix recentBLOCK_JOB_ERRORregressionblockjob.c | 8 ++++++-- qapi/block-core.json | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)