qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 01/13] block: Allow freezing BdrvChild links


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 01/13] block: Allow freezing BdrvChild links
Date: Wed, 13 Mar 2019 15:29:36 +0100
User-agent: Mutt/1.11.3 (2019-02-01)

Am 13.03.2019 um 15:14 hat Alberto Garcia geschrieben:
> On Tue 12 Mar 2019 05:12:53 PM CET, Vladimir Sementsov-Ogievskiy wrote:
> >> +    /* This function changes all links that point to top and makes
> >> +     * them point to base. Check that none of them is frozen. */
> >> +    QLIST_FOREACH(c, &top->parents, next_parent) {
> >> +        if (c->frozen) {
> >> +            goto exit;
> >> +        }
> >> +    }
> >> +
> 
> > Hmm, looking at this I have a bit unrelated questions about
> > bdrv_drop_intermediate:
> >
> > 1. if we fail on some iteration of QLIST_FOREACH_SAFE loop, we finish
> > up with partly updated graph??
> 
> >    I don't see any kind of roll-back in this case.. Why it don't
> >    operate like bdrv_replace_node, which firstly check all
> >    permissions, and then update all parents in fail-free loop?
> 
> I think you're right. If you don't have something written already I
> could try to do it.
> 
> > 2. And therefore, why we just don't call bdrv_replace_node(top, base,
> > errp) from bdrv_drop_intermediate?
> 
> I think that would not call role->update_filename().

And role->update_filename() involves I/O, so you can't roll back across
it anyway. I think this was the reason why we didn't roll back the
in-memory state either, it would become inconsistent with what is on the
disk.

Kevin



reply via email to

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