diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-03-29 20:53:05 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-03-29 20:53:05 +0100 |
commit | 68894b5fed671d49587209697f2224b4e857fd1a (patch) | |
tree | 5a64c2faa2da9389d94162c015263a038135dbdb /block/stream.c | |
parent | 6ae6a30ca579be81d5a4a0e2cbfe714d375e0560 (diff) | |
parent | d5699c0d4b29e919b87049d948a30527897b7e8a (diff) |
Merge tag 'pull-block-2022-03-29' of https://gitlab.com/hreitz/qemu into staging
Block patches for 7.0-rc2:
- Disable GLOBAL_STATE_CODE() assertion for the 7.0 release: We got
another bug report for this, and we do not have the time to
investigate before 7.0, so disable the assertion for the release, to
re-enable and continue investigation in the 7.1 cycle
- stream job fix (regarding interaction with concurrent block jobs)
- iotests fixes
# gpg: Signature made Tue 29 Mar 2022 15:55:33 BST
# gpg: using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg: issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00 4D34 A1FA 40D0 9801 9CDF
* tag 'pull-block-2022-03-29' of https://gitlab.com/hreitz/qemu:
iotests: Fix status checks
block/stream: Drain subtree around graph change
main-loop: Disable GLOBAL_STATE_CODE() assertions
iotests: update test owner contact information
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/stream.c')
-rw-r--r-- | block/stream.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/block/stream.c b/block/stream.c index 3acb59fe6a..694709bd25 100644 --- a/block/stream.c +++ b/block/stream.c @@ -64,7 +64,13 @@ static int stream_prepare(Job *job) bdrv_cor_filter_drop(s->cor_filter_bs); s->cor_filter_bs = NULL; + bdrv_subtree_drained_begin(s->above_base); + base = bdrv_filter_or_cow_bs(s->above_base); + if (base) { + bdrv_ref(base); + } + unfiltered_base = bdrv_skip_filters(base); if (bdrv_cow_child(unfiltered_bs)) { @@ -75,14 +81,21 @@ static int stream_prepare(Job *job) base_fmt = unfiltered_base->drv->format_name; } } + bdrv_set_backing_hd(unfiltered_bs, base, &local_err); ret = bdrv_change_backing_file(unfiltered_bs, base_id, base_fmt, false); if (local_err) { error_report_err(local_err); - return -EPERM; + ret = -EPERM; + goto out; } } +out: + if (base) { + bdrv_unref(base); + } + bdrv_subtree_drained_end(s->above_base); return ret; } |