On Wed, 05/04 12:12, Kevin Wolf wrote: > Am 19.04.2016 um 03:42 hat Fam Zheng geschrieben: > > Currently we only inactivate the top BDS. Actually bdrv_inactivate > > should be the opposite of bdrv_invalidate_cache. > > > > Recurse into the whole subtree instead. > > > > Signed-off-by: Fam Zheng <f...@redhat.com> > > Did you actually test this? > > I would expect that bs->drv->bdrv_inactivate() fails now (as in > assertion failure) if it has anything to flush to the image because > bs->file has already be inactivated before. I think children need to be > inactived after their parents.
OK, my test apparently failed to trigger that bdrv_pwritv() path. Good catch! > > Nodes with multiple parents could actually become even more > interesting... I'll make it two passes recursion: one for calling drv->bdrv_inactivate and the other for setting BDRV_O_INACTIVATE. Fam