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

2019-03-13 Thread Kevin Wolf
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,

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

2019-03-13 Thread Alberto Garcia
On Wed 13 Mar 2019 03:32:09 PM CET, Alberto Garcia wrote: >>> > 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 r

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

2019-03-13 Thread Alberto Garcia
On Wed 13 Mar 2019 03:29:36 PM CET, Kevin Wolf wrote: > 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

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

2019-03-13 Thread Vladimir Sementsov-Ogievskiy
13.03.2019 17:14, Alberto Garcia wrote: > 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, ne

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

2019-03-13 Thread Alberto Garcia
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) { >>

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

2019-03-12 Thread Vladimir Sementsov-Ogievskiy
06.03.2019 21:11, Alberto Garcia wrote: > Our permission system is useful to define what operations are allowed > on a certain block node and includes things like BLK_PERM_WRITE or > BLK_PERM_RESIZE among others. > > One of the permissions is BLK_PERM_GRAPH_MOD which allows "changing > the node th

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

2019-03-06 Thread Alberto Garcia
Our permission system is useful to define what operations are allowed on a certain block node and includes things like BLK_PERM_WRITE or BLK_PERM_RESIZE among others. One of the permissions is BLK_PERM_GRAPH_MOD which allows "changing the node that this BdrvChild points to". The exact meaning of t