[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 04/13] block: Freeze the backing chain for the d
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 04/13] block: Freeze the backing chain for the duration of the stream job |
Date: |
Tue, 12 Feb 2019 16:15:58 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Am 17.01.2019 um 16:33 hat Alberto Garcia geschrieben:
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
> block/stream.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/block/stream.c b/block/stream.c
> index 7a49ac0992..39a2e10892 100644
> --- a/block/stream.c
> +++ b/block/stream.c
> @@ -54,6 +54,14 @@ static int coroutine_fn stream_populate(BlockBackend *blk,
> return blk_co_preadv(blk, offset, qiov.size, &qiov,
> BDRV_REQ_COPY_ON_READ);
> }
>
> +static void stream_abort(Job *job)
> +{
> + StreamBlockJob *s = container_of(job, StreamBlockJob, common.job);
> + BlockJob *bjob = &s->common;
> +
> + bdrv_unfreeze_backing_chain(blk_bs(bjob->blk), s->base);
> +}
Like in commit, you can get a double unfreeze here if .abort is called
after .prepare returned an error.
Kevin
- Re: [Qemu-block] [PATCH 04/13] block: Freeze the backing chain for the duration of the stream job,
Kevin Wolf <=