On Tue, Jan 31, 2017 at 02:23:08PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Current implementation invalidates firstly parent bds and then its > children. This leads to the following bug: > > after incoming migration, in bdrv_invalidate_cache_all: > 1. invalidate parent bds - reopen it with BDRV_O_INACTIVE cleared > 2. child is not yet invalidated > 3. parent check that its BDRV_O_INACTIVE is cleared > 4. parent writes to child > 5. assert in bdrv_co_pwritev, as BDRV_O_INACTIVE is set for child > > This patch fixes it by just changing invalidate sequence: invalidate > children first. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > --- > > v2: I've missed that bdrv_invalidate_cache is already recursive, so we > can change sequence here. Also v1 doesn't cover the case when > bdrv_invalidate_cache is called not from bdrv_invalidate_cache_all. > > block.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature