1 | The following changes since commit d5d31c9a8ab5e87db4230602a6fd5da8eb13135c: | 1 | The following changes since commit e1e44a9916b4318e943aecd669e096222cb3eaeb: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-for-3.1-pull-request' into staging (2018-11-27 09:55:05 +0000) | 3 | Merge remote-tracking branch 'remotes/xtensa/tags/20180316-xtensa' into staging (2018-03-17 14:15:03 +0000) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the git repository at: |
6 | 6 | ||
7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream | 7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream |
8 | 8 | ||
9 | for you to fetch changes up to 6da021815e752b3ca3a547eed53f3e92a8a35452: | 9 | for you to fetch changes up to 63ca8406beac44aa59c389ed8578d0c7b3da3402: |
10 | 10 | ||
11 | nvme: Fix spurious interrupts (2018-11-27 12:59:00 +0100) | 11 | iotests: Avoid realpath, for CentOS 6 (2018-03-19 12:01:39 +0100) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block layer patches: | 14 | Block layer patches |
15 | |||
16 | - block: Fix crash on migration with explicit child nodes | ||
17 | - nvme: Fix spurious interrupts | ||
18 | 15 | ||
19 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
20 | Keith Busch (1): | 17 | Eric Blake (1): |
21 | nvme: Fix spurious interrupts | 18 | iotests: Avoid realpath, for CentOS 6 |
22 | 19 | ||
23 | Kevin Wolf (2): | 20 | Fam Zheng (4): |
24 | block: Don't inactivate children before parents | 21 | block: Fix flags in reopen queue |
25 | iotests: Test migration with -blockdev | 22 | iotests: Add regression test for commit base locking |
23 | vvfat: Fix inherit_options flags | ||
24 | block: Fix leak of ignore_children in error path | ||
26 | 25 | ||
27 | block.c | 84 +++++++++++++++++++------------ | 26 | Jeff Cody (1): |
28 | hw/block/nvme.c | 4 +- | 27 | block: fix iotest 146 output expectations |
29 | tests/qemu-iotests/234 | 121 +++++++++++++++++++++++++++++++++++++++++++++ | ||
30 | tests/qemu-iotests/234.out | 30 +++++++++++ | ||
31 | tests/qemu-iotests/group | 1 + | ||
32 | 5 files changed, 208 insertions(+), 32 deletions(-) | ||
33 | create mode 100755 tests/qemu-iotests/234 | ||
34 | create mode 100644 tests/qemu-iotests/234.out | ||
35 | 28 | ||
29 | John Snow (21): | ||
30 | blockjobs: fix set-speed kick | ||
31 | blockjobs: model single jobs as transactions | ||
32 | Blockjobs: documentation touchup | ||
33 | blockjobs: add status enum | ||
34 | blockjobs: add state transition table | ||
35 | iotests: add pause_wait | ||
36 | blockjobs: add block_job_verb permission table | ||
37 | blockjobs: add ABORTING state | ||
38 | blockjobs: add CONCLUDED state | ||
39 | blockjobs: add NULL state | ||
40 | blockjobs: add block_job_dismiss | ||
41 | blockjobs: ensure abort is called for cancelled jobs | ||
42 | blockjobs: add commit, abort, clean helpers | ||
43 | blockjobs: add block_job_txn_apply function | ||
44 | blockjobs: add prepare callback | ||
45 | blockjobs: add waiting status | ||
46 | blockjobs: add PENDING status and event | ||
47 | blockjobs: add block-job-finalize | ||
48 | blockjobs: Expose manual property | ||
49 | iotests: test manual job dismissal | ||
50 | tests/test-blockjob: test cancellations | ||
51 | |||
52 | Kevin Wolf (14): | ||
53 | luks: Separate image file creation from formatting | ||
54 | luks: Create block_crypto_co_create_generic() | ||
55 | luks: Support .bdrv_co_create | ||
56 | luks: Turn invalid assertion into check | ||
57 | luks: Catch integer overflow for huge sizes | ||
58 | qemu-iotests: Test luks QMP image creation | ||
59 | parallels: Support .bdrv_co_create | ||
60 | qemu-iotests: Enable write tests for parallels | ||
61 | qcow: Support .bdrv_co_create | ||
62 | qed: Support .bdrv_co_create | ||
63 | vdi: Make comments consistent with other drivers | ||
64 | vhdx: Support .bdrv_co_create | ||
65 | vpc: Support .bdrv_co_create | ||
66 | vpc: Require aligned size in .bdrv_co_create | ||
67 | |||
68 | Liang Li (1): | ||
69 | block/mirror: change the semantic of 'force' of block-job-cancel | ||
70 | |||
71 | Max Reitz (3): | ||
72 | vdi: Pull option parsing from vdi_co_create | ||
73 | vdi: Move file creation to vdi_co_create_opts | ||
74 | vdi: Implement .bdrv_co_create | ||
75 | |||
76 | Paolo Bonzini (1): | ||
77 | iscsi: fix iSER compilation | ||
78 | |||
79 | qapi/block-core.json | 363 ++++++++++++++++++++++++++++++++++++++++-- | ||
80 | include/block/blockjob.h | 71 ++++++++- | ||
81 | include/block/blockjob_int.h | 17 +- | ||
82 | block.c | 10 +- | ||
83 | block/backup.c | 5 +- | ||
84 | block/commit.c | 2 +- | ||
85 | block/crypto.c | 150 ++++++++++++----- | ||
86 | block/iscsi.c | 2 +- | ||
87 | block/mirror.c | 12 +- | ||
88 | block/parallels.c | 199 +++++++++++++++++------ | ||
89 | block/qcow.c | 196 +++++++++++++++-------- | ||
90 | block/qed.c | 204 ++++++++++++++++-------- | ||
91 | block/stream.c | 2 +- | ||
92 | block/vdi.c | 147 +++++++++++++---- | ||
93 | block/vhdx.c | 216 +++++++++++++++++++------ | ||
94 | block/vpc.c | 241 +++++++++++++++++++++------- | ||
95 | block/vvfat.c | 2 +- | ||
96 | blockdev.c | 71 +++++++-- | ||
97 | blockjob.c | 358 +++++++++++++++++++++++++++++++++++------ | ||
98 | tests/test-bdrv-drain.c | 5 +- | ||
99 | tests/test-blockjob-txn.c | 27 ++-- | ||
100 | tests/test-blockjob.c | 233 ++++++++++++++++++++++++++- | ||
101 | block/trace-events | 7 + | ||
102 | hmp-commands.hx | 3 +- | ||
103 | tests/qemu-iotests/030 | 6 +- | ||
104 | tests/qemu-iotests/055 | 17 +- | ||
105 | tests/qemu-iotests/056 | 187 ++++++++++++++++++++++ | ||
106 | tests/qemu-iotests/056.out | 4 +- | ||
107 | tests/qemu-iotests/109.out | 24 +-- | ||
108 | tests/qemu-iotests/146.out | 2 +- | ||
109 | tests/qemu-iotests/153 | 12 ++ | ||
110 | tests/qemu-iotests/153.out | 5 + | ||
111 | tests/qemu-iotests/181 | 2 +- | ||
112 | tests/qemu-iotests/210 | 210 ++++++++++++++++++++++++ | ||
113 | tests/qemu-iotests/210.out | 136 ++++++++++++++++ | ||
114 | tests/qemu-iotests/check | 13 +- | ||
115 | tests/qemu-iotests/common.rc | 2 +- | ||
116 | tests/qemu-iotests/group | 1 + | ||
117 | tests/qemu-iotests/iotests.py | 12 +- | ||
118 | 39 files changed, 2652 insertions(+), 524 deletions(-) | ||
119 | create mode 100755 tests/qemu-iotests/210 | ||
120 | create mode 100644 tests/qemu-iotests/210.out | ||
121 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | bdrv_child_cb_inactivate() asserts that parents are already inactive | ||
2 | when children get inactivated. This precondition is necessary because | ||
3 | parents could still issue requests in their inactivation code. | ||
4 | 1 | ||
5 | When block nodes are created individually with -blockdev, all of them | ||
6 | are monitor owned and will be returned by bdrv_next() in an undefined | ||
7 | order (in practice, in the order of their creation, which is usually | ||
8 | children before parents), which obviously fails the assertion: | ||
9 | |||
10 | qemu: block.c:899: bdrv_child_cb_inactivate: Assertion `bs->open_flags & BDRV_O_INACTIVE' failed. | ||
11 | |||
12 | This patch fixes the ordering by skipping nodes with still active | ||
13 | parents in bdrv_inactivate_recurse() because we know that they will be | ||
14 | covered by recursion when the last active parent becomes inactive. | ||
15 | |||
16 | With the correct parents-before-children ordering, we also got rid of | ||
17 | the reason why commit aad0b7a0bfb introduced two passes, so we can go | ||
18 | back to a single-pass recursion. This is necessary so we can rely on the | ||
19 | BDRV_O_INACTIVE flag to skip nodes with active parents (the flag used | ||
20 | to be set only in pass 2, so we would always skip non-root nodes in | ||
21 | pass 1 because all parents would still be considered active; setting the | ||
22 | flag in pass 1 would mean, that we never skip anything in pass 2 because | ||
23 | all parents are already considered inactive). | ||
24 | |||
25 | Because of the change to single pass, this patch is best reviewed with | ||
26 | whitespace changes ignored. | ||
27 | |||
28 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
29 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
30 | --- | ||
31 | block.c | 84 ++++++++++++++++++++++++++++++++++++--------------------- | ||
32 | 1 file changed, 53 insertions(+), 31 deletions(-) | ||
33 | |||
34 | diff --git a/block.c b/block.c | ||
35 | index XXXXXXX..XXXXXXX 100644 | ||
36 | --- a/block.c | ||
37 | +++ b/block.c | ||
38 | @@ -XXX,XX +XXX,XX @@ void bdrv_invalidate_cache_all(Error **errp) | ||
39 | } | ||
40 | } | ||
41 | |||
42 | -static int bdrv_inactivate_recurse(BlockDriverState *bs, | ||
43 | - bool setting_flag) | ||
44 | +static bool bdrv_has_bds_parent(BlockDriverState *bs, bool only_active) | ||
45 | +{ | ||
46 | + BdrvChild *parent; | ||
47 | + | ||
48 | + QLIST_FOREACH(parent, &bs->parents, next_parent) { | ||
49 | + if (parent->role->parent_is_bds) { | ||
50 | + BlockDriverState *parent_bs = parent->opaque; | ||
51 | + if (!only_active || !(parent_bs->open_flags & BDRV_O_INACTIVE)) { | ||
52 | + return true; | ||
53 | + } | ||
54 | + } | ||
55 | + } | ||
56 | + | ||
57 | + return false; | ||
58 | +} | ||
59 | + | ||
60 | +static int bdrv_inactivate_recurse(BlockDriverState *bs) | ||
61 | { | ||
62 | BdrvChild *child, *parent; | ||
63 | + uint64_t perm, shared_perm; | ||
64 | int ret; | ||
65 | |||
66 | if (!bs->drv) { | ||
67 | return -ENOMEDIUM; | ||
68 | } | ||
69 | |||
70 | - if (!setting_flag && bs->drv->bdrv_inactivate) { | ||
71 | + /* Make sure that we don't inactivate a child before its parent. | ||
72 | + * It will be covered by recursion from the yet active parent. */ | ||
73 | + if (bdrv_has_bds_parent(bs, true)) { | ||
74 | + return 0; | ||
75 | + } | ||
76 | + | ||
77 | + assert(!(bs->open_flags & BDRV_O_INACTIVE)); | ||
78 | + | ||
79 | + /* Inactivate this node */ | ||
80 | + if (bs->drv->bdrv_inactivate) { | ||
81 | ret = bs->drv->bdrv_inactivate(bs); | ||
82 | if (ret < 0) { | ||
83 | return ret; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | - if (setting_flag && !(bs->open_flags & BDRV_O_INACTIVE)) { | ||
88 | - uint64_t perm, shared_perm; | ||
89 | - | ||
90 | - QLIST_FOREACH(parent, &bs->parents, next_parent) { | ||
91 | - if (parent->role->inactivate) { | ||
92 | - ret = parent->role->inactivate(parent); | ||
93 | - if (ret < 0) { | ||
94 | - return ret; | ||
95 | - } | ||
96 | + QLIST_FOREACH(parent, &bs->parents, next_parent) { | ||
97 | + if (parent->role->inactivate) { | ||
98 | + ret = parent->role->inactivate(parent); | ||
99 | + if (ret < 0) { | ||
100 | + return ret; | ||
101 | } | ||
102 | } | ||
103 | + } | ||
104 | |||
105 | - bs->open_flags |= BDRV_O_INACTIVE; | ||
106 | + bs->open_flags |= BDRV_O_INACTIVE; | ||
107 | + | ||
108 | + /* Update permissions, they may differ for inactive nodes */ | ||
109 | + bdrv_get_cumulative_perm(bs, &perm, &shared_perm); | ||
110 | + bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, &error_abort); | ||
111 | + bdrv_set_perm(bs, perm, shared_perm); | ||
112 | |||
113 | - /* Update permissions, they may differ for inactive nodes */ | ||
114 | - bdrv_get_cumulative_perm(bs, &perm, &shared_perm); | ||
115 | - bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, &error_abort); | ||
116 | - bdrv_set_perm(bs, perm, shared_perm); | ||
117 | - } | ||
118 | |||
119 | + /* Recursively inactivate children */ | ||
120 | QLIST_FOREACH(child, &bs->children, next) { | ||
121 | - ret = bdrv_inactivate_recurse(child->bs, setting_flag); | ||
122 | + ret = bdrv_inactivate_recurse(child->bs); | ||
123 | if (ret < 0) { | ||
124 | return ret; | ||
125 | } | ||
126 | @@ -XXX,XX +XXX,XX @@ int bdrv_inactivate_all(void) | ||
127 | BlockDriverState *bs = NULL; | ||
128 | BdrvNextIterator it; | ||
129 | int ret = 0; | ||
130 | - int pass; | ||
131 | GSList *aio_ctxs = NULL, *ctx; | ||
132 | |||
133 | for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { | ||
134 | @@ -XXX,XX +XXX,XX @@ int bdrv_inactivate_all(void) | ||
135 | } | ||
136 | } | ||
137 | |||
138 | - /* We do two passes of inactivation. The first pass calls to drivers' | ||
139 | - * .bdrv_inactivate callbacks recursively so all cache is flushed to disk; | ||
140 | - * the second pass sets the BDRV_O_INACTIVE flag so that no further write | ||
141 | - * is allowed. */ | ||
142 | - for (pass = 0; pass < 2; pass++) { | ||
143 | - for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { | ||
144 | - ret = bdrv_inactivate_recurse(bs, pass); | ||
145 | - if (ret < 0) { | ||
146 | - bdrv_next_cleanup(&it); | ||
147 | - goto out; | ||
148 | - } | ||
149 | + for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { | ||
150 | + /* Nodes with BDS parents are covered by recursion from the last | ||
151 | + * parent that gets inactivated. Don't inactivate them a second | ||
152 | + * time if that has already happened. */ | ||
153 | + if (bdrv_has_bds_parent(bs, false)) { | ||
154 | + continue; | ||
155 | + } | ||
156 | + ret = bdrv_inactivate_recurse(bs); | ||
157 | + if (ret < 0) { | ||
158 | + bdrv_next_cleanup(&it); | ||
159 | + goto out; | ||
160 | } | ||
161 | } | ||
162 | |||
163 | -- | ||
164 | 2.19.1 | ||
165 | |||
166 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Check that block node activation and inactivation works with a block | ||
2 | graph that is built with individually created nodes. | ||
3 | 1 | ||
4 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
5 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
6 | --- | ||
7 | tests/qemu-iotests/234 | 121 +++++++++++++++++++++++++++++++++++++ | ||
8 | tests/qemu-iotests/234.out | 30 +++++++++ | ||
9 | tests/qemu-iotests/group | 1 + | ||
10 | 3 files changed, 152 insertions(+) | ||
11 | create mode 100755 tests/qemu-iotests/234 | ||
12 | create mode 100644 tests/qemu-iotests/234.out | ||
13 | |||
14 | diff --git a/tests/qemu-iotests/234 b/tests/qemu-iotests/234 | ||
15 | new file mode 100755 | ||
16 | index XXXXXXX..XXXXXXX | ||
17 | --- /dev/null | ||
18 | +++ b/tests/qemu-iotests/234 | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | +#!/usr/bin/env python | ||
21 | +# | ||
22 | +# Copyright (C) 2018 Red Hat, Inc. | ||
23 | +# | ||
24 | +# This program is free software; you can redistribute it and/or modify | ||
25 | +# it under the terms of the GNU General Public License as published by | ||
26 | +# the Free Software Foundation; either version 2 of the License, or | ||
27 | +# (at your option) any later version. | ||
28 | +# | ||
29 | +# This program is distributed in the hope that it will be useful, | ||
30 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
31 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
32 | +# GNU General Public License for more details. | ||
33 | +# | ||
34 | +# You should have received a copy of the GNU General Public License | ||
35 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
36 | +# | ||
37 | +# Creator/Owner: Kevin Wolf <kwolf@redhat.com> | ||
38 | +# | ||
39 | +# Check that block node activation and inactivation works with a block graph | ||
40 | +# that is built with individually created nodes | ||
41 | + | ||
42 | +import iotests | ||
43 | +import os | ||
44 | + | ||
45 | +iotests.verify_image_format(supported_fmts=['qcow2']) | ||
46 | +iotests.verify_platform(['linux']) | ||
47 | + | ||
48 | +with iotests.FilePath('img') as img_path, \ | ||
49 | + iotests.FilePath('backing') as backing_path, \ | ||
50 | + iotests.FilePath('mig_fifo_a') as fifo_a, \ | ||
51 | + iotests.FilePath('mig_fifo_b') as fifo_b, \ | ||
52 | + iotests.VM(path_suffix='a') as vm_a, \ | ||
53 | + iotests.VM(path_suffix='b') as vm_b: | ||
54 | + | ||
55 | + iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, backing_path, '64M') | ||
56 | + iotests.qemu_img_pipe('create', '-f', iotests.imgfmt, img_path, '64M') | ||
57 | + | ||
58 | + os.mkfifo(fifo_a) | ||
59 | + os.mkfifo(fifo_b) | ||
60 | + | ||
61 | + iotests.log('Launching source VM...') | ||
62 | + (vm_a.add_blockdev('file,filename=%s,node-name=drive0-file' % (img_path)) | ||
63 | + .add_blockdev('%s,file=drive0-file,node-name=drive0' % (iotests.imgfmt)) | ||
64 | + .add_blockdev('file,filename=%s,node-name=drive0-backing-file' % (backing_path)) | ||
65 | + .add_blockdev('%s,file=drive0-backing-file,node-name=drive0-backing' % (iotests.imgfmt)) | ||
66 | + .launch()) | ||
67 | + | ||
68 | + iotests.log('Launching destination VM...') | ||
69 | + (vm_b.add_blockdev('file,filename=%s,node-name=drive0-file' % (img_path)) | ||
70 | + .add_blockdev('%s,file=drive0-file,node-name=drive0' % (iotests.imgfmt)) | ||
71 | + .add_blockdev('file,filename=%s,node-name=drive0-backing-file' % (backing_path)) | ||
72 | + .add_blockdev('%s,file=drive0-backing-file,node-name=drive0-backing' % (iotests.imgfmt)) | ||
73 | + .add_incoming("exec: cat '%s'" % (fifo_a)) | ||
74 | + .launch()) | ||
75 | + | ||
76 | + # Add a child node that was created after the parent node. The reverse case | ||
77 | + # is covered by the -blockdev options above. | ||
78 | + iotests.log(vm_a.qmp('blockdev-snapshot', node='drive0-backing', | ||
79 | + overlay='drive0')) | ||
80 | + iotests.log(vm_b.qmp('blockdev-snapshot', node='drive0-backing', | ||
81 | + overlay='drive0')) | ||
82 | + | ||
83 | + iotests.log('Enabling migration QMP events on A...') | ||
84 | + iotests.log(vm_a.qmp('migrate-set-capabilities', capabilities=[ | ||
85 | + { | ||
86 | + 'capability': 'events', | ||
87 | + 'state': True | ||
88 | + } | ||
89 | + ])) | ||
90 | + | ||
91 | + iotests.log('Starting migration to B...') | ||
92 | + iotests.log(vm_a.qmp('migrate', uri='exec:cat >%s' % (fifo_a))) | ||
93 | + with iotests.Timeout(3, 'Migration does not complete'): | ||
94 | + while True: | ||
95 | + event = vm_a.event_wait('MIGRATION') | ||
96 | + iotests.log(event, filters=[iotests.filter_qmp_event]) | ||
97 | + if event['data']['status'] == 'completed': | ||
98 | + break | ||
99 | + | ||
100 | + iotests.log(vm_a.qmp('query-migrate')['return']['status']) | ||
101 | + iotests.log(vm_b.qmp('query-migrate')['return']['status']) | ||
102 | + | ||
103 | + iotests.log(vm_a.qmp('query-status')) | ||
104 | + iotests.log(vm_b.qmp('query-status')) | ||
105 | + | ||
106 | + iotests.log('Add a second parent to drive0-file...') | ||
107 | + iotests.log(vm_b.qmp('blockdev-add', driver='raw', file='drive0-file', | ||
108 | + node_name='drive0-raw')) | ||
109 | + | ||
110 | + iotests.log('Restart A with -incoming and second parent...') | ||
111 | + vm_a.shutdown() | ||
112 | + (vm_a.add_blockdev('raw,file=drive0-file,node-name=drive0-raw') | ||
113 | + .add_incoming("exec: cat '%s'" % (fifo_b)) | ||
114 | + .launch()) | ||
115 | + | ||
116 | + iotests.log(vm_a.qmp('blockdev-snapshot', node='drive0-backing', | ||
117 | + overlay='drive0')) | ||
118 | + | ||
119 | + iotests.log('Enabling migration QMP events on B...') | ||
120 | + iotests.log(vm_b.qmp('migrate-set-capabilities', capabilities=[ | ||
121 | + { | ||
122 | + 'capability': 'events', | ||
123 | + 'state': True | ||
124 | + } | ||
125 | + ])) | ||
126 | + | ||
127 | + iotests.log('Starting migration back to A...') | ||
128 | + iotests.log(vm_b.qmp('migrate', uri='exec:cat >%s' % (fifo_b))) | ||
129 | + with iotests.Timeout(3, 'Migration does not complete'): | ||
130 | + while True: | ||
131 | + event = vm_b.event_wait('MIGRATION') | ||
132 | + iotests.log(event, filters=[iotests.filter_qmp_event]) | ||
133 | + if event['data']['status'] == 'completed': | ||
134 | + break | ||
135 | + | ||
136 | + iotests.log(vm_a.qmp('query-migrate')['return']['status']) | ||
137 | + iotests.log(vm_b.qmp('query-migrate')['return']['status']) | ||
138 | + | ||
139 | + iotests.log(vm_a.qmp('query-status')) | ||
140 | + iotests.log(vm_b.qmp('query-status')) | ||
141 | diff --git a/tests/qemu-iotests/234.out b/tests/qemu-iotests/234.out | ||
142 | new file mode 100644 | ||
143 | index XXXXXXX..XXXXXXX | ||
144 | --- /dev/null | ||
145 | +++ b/tests/qemu-iotests/234.out | ||
146 | @@ -XXX,XX +XXX,XX @@ | ||
147 | +Launching source VM... | ||
148 | +Launching destination VM... | ||
149 | +{"return": {}} | ||
150 | +{"return": {}} | ||
151 | +Enabling migration QMP events on A... | ||
152 | +{"return": {}} | ||
153 | +Starting migration to B... | ||
154 | +{"return": {}} | ||
155 | +{"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
156 | +{"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
157 | +{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
158 | +completed | ||
159 | +completed | ||
160 | +{"return": {"running": false, "singlestep": false, "status": "postmigrate"}} | ||
161 | +{"return": {"running": true, "singlestep": false, "status": "running"}} | ||
162 | +Add a second parent to drive0-file... | ||
163 | +{"return": {}} | ||
164 | +Restart A with -incoming and second parent... | ||
165 | +{"return": {}} | ||
166 | +Enabling migration QMP events on B... | ||
167 | +{"return": {}} | ||
168 | +Starting migration back to A... | ||
169 | +{"return": {}} | ||
170 | +{"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
171 | +{"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
172 | +{"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
173 | +completed | ||
174 | +completed | ||
175 | +{"return": {"running": true, "singlestep": false, "status": "running"}} | ||
176 | +{"return": {"running": false, "singlestep": false, "status": "postmigrate"}} | ||
177 | diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group | ||
178 | index XXXXXXX..XXXXXXX 100644 | ||
179 | --- a/tests/qemu-iotests/group | ||
180 | +++ b/tests/qemu-iotests/group | ||
181 | @@ -XXX,XX +XXX,XX @@ | ||
182 | 231 auto quick | ||
183 | 232 auto quick | ||
184 | 233 auto quick | ||
185 | +234 auto quick migration | ||
186 | -- | ||
187 | 2.19.1 | ||
188 | |||
189 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Keith Busch <keith.busch@intel.com> | ||
2 | 1 | ||
3 | The code had asserted an interrupt every time it was requested to check | ||
4 | for new completion queue entries.This can result in spurious interrupts | ||
5 | seen by the guest OS. | ||
6 | |||
7 | Fix this by asserting an interrupt only if there are un-acknowledged | ||
8 | completion queue entries available. | ||
9 | |||
10 | Reported-by: Guenter Roeck <linux@roeck-us.net> | ||
11 | Signed-off-by: Keith Busch <keith.busch@intel.com> | ||
12 | Tested-by: Guenter Roeck <linux@roeck-us.net> | ||
13 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
14 | --- | ||
15 | hw/block/nvme.c | 4 +++- | ||
16 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/hw/block/nvme.c b/hw/block/nvme.c | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/hw/block/nvme.c | ||
21 | +++ b/hw/block/nvme.c | ||
22 | @@ -XXX,XX +XXX,XX @@ static void nvme_post_cqes(void *opaque) | ||
23 | sizeof(req->cqe)); | ||
24 | QTAILQ_INSERT_TAIL(&sq->req_list, req, entry); | ||
25 | } | ||
26 | - nvme_irq_assert(n, cq); | ||
27 | + if (cq->tail != cq->head) { | ||
28 | + nvme_irq_assert(n, cq); | ||
29 | + } | ||
30 | } | ||
31 | |||
32 | static void nvme_enqueue_req_completion(NvmeCQueue *cq, NvmeRequest *req) | ||
33 | -- | ||
34 | 2.19.1 | ||
35 | |||
36 | diff view generated by jsdifflib |