qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/13] block: Freeze the backing chain for the d


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 02/13] block: Freeze the backing chain for the duration of the commit job
Date: Thu, 14 Feb 2019 16:45:12 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

Am 14.02.2019 um 16:21 hat Alberto Garcia geschrieben:
> On Tue 12 Feb 2019 03:54:15 PM CET, Kevin Wolf wrote:
> >> @@ -336,6 +340,10 @@ void commit_start(const char *job_id, 
> >> BlockDriverState *bs,
> >>          }
> >>      }
> >>  
> >> +    if (bdrv_freeze_backing_chain(commit_top_bs, base, errp) < 0) {
> >> +        goto fail;
> >> +    }
> >
> > Don't error paths need to unfreeze after this?
> 
> Yes, and while debugging this I realized that the error path is wrong:
> 
>     if (commit_top_bs) {
>         bdrv_replace_node(commit_top_bs, top, &error_abort);
>     }
>     job_early_fail(&s->common.job);
> 
> Doing bdrv_replace_node() here before job_early_fail() fails with
> 
> Unexpected error in bdrv_check_update_perm() at block.c:1920:
> Conflicts with use by commit job 'virtio0' as 'intermediate node', which does 
> not allow 'consistent read' on <node-name>
> Aborted

Oh, good point. And it seems to have been wrong even since permissions
were introduced to the commit job in 8dfba279776.

> I'll write a separate patch for this problem.

And a test case! :-)

(That is, if the errors can even be triggered reliably without modifying
the code.)

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]