[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
- Re: [Qemu-devel] [PATCH v2 09/13] block: Add a 'mutable_opts' field to BlockDriver, (continued)
- [Qemu-devel] [PATCH v2 04/13] block: Freeze the backing chain for the duration of the stream job, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 10/13] block: Add bdrv_reset_options_allowed(), Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 13/13] qemu-iotests: Test the x-blockdev-reopen QMP command, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 03/13] block: Freeze the backing chain for the duration of the mirror job, Alberto Garcia, 2019/03/06
- [Qemu-devel] [PATCH v2 01/13] block: Allow freezing BdrvChild links, Alberto Garcia, 2019/03/06
[Qemu-devel] [PATCH v2 12/13] block: Add an 'x-blockdev-reopen' QMP command, Alberto Garcia, 2019/03/06
[Qemu-devel] [PATCH v2 02/13] block: Freeze the backing chain for the duration of the commit job, Alberto Garcia, 2019/03/06
[Qemu-devel] [PATCH v2 07/13] block: Allow omitting the 'backing' option in certain cases, Alberto Garcia, 2019/03/06