mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
block: bdrv_reopen_parse_backing(): don't check frozen child
bdrv_set_backing_noperm() takes care of it (actual check is in bdrv_set_file_or_backing_noperm()), so we don't need to check it here. While being here, improve error message a bit. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210610120537.196183-5-vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
fd26b8a089
commit
bfae052a57
2 changed files with 5 additions and 17 deletions
|
@ -878,7 +878,7 @@ class TestBlockdevReopen(iotests.QMPTestCase):
|
|||
|
||||
# We can't remove hd1 while the stream job is ongoing
|
||||
opts['backing'] = None
|
||||
self.reopen(opts, {}, "Cannot change 'backing' link from 'hd0' to 'hd1'")
|
||||
self.reopen(opts, {}, "Cannot change frozen 'backing' link from 'hd0' to 'hd1'")
|
||||
|
||||
self.vm.run_job('stream0', auto_finalize = False, auto_dismiss = True)
|
||||
|
||||
|
@ -910,7 +910,7 @@ class TestBlockdevReopen(iotests.QMPTestCase):
|
|||
# We can't remove hd2 while the stream job is ongoing
|
||||
opts['backing']['backing'] = None
|
||||
self.reopen(opts['backing'], {'read-only': False},
|
||||
"Cannot change 'backing' link from 'hd1' to 'hd2'")
|
||||
"Cannot change frozen 'backing' link from 'hd1' to 'hd2'")
|
||||
|
||||
# We can detach hd1 from hd0 because it doesn't affect the stream job
|
||||
opts['backing'] = None
|
||||
|
@ -933,11 +933,11 @@ class TestBlockdevReopen(iotests.QMPTestCase):
|
|||
|
||||
# We can't remove hd2 while the commit job is ongoing
|
||||
opts['backing']['backing'] = None
|
||||
self.reopen(opts, {}, "Cannot change 'backing' link from 'hd1' to 'hd2'")
|
||||
self.reopen(opts, {}, "Cannot change frozen 'backing' link from 'hd1' to 'hd2'")
|
||||
|
||||
# We can't remove hd1 while the commit job is ongoing
|
||||
opts['backing'] = None
|
||||
self.reopen(opts, {}, "Cannot change 'backing' link from 'hd0' to 'hd1'")
|
||||
self.reopen(opts, {}, "Cannot change frozen 'backing' link from 'hd0' to 'hd1'")
|
||||
|
||||
event = self.vm.event_wait(name='BLOCK_JOB_READY')
|
||||
self.assert_qmp(event, 'data/device', 'commit0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue