On 07.02.20 17:12, Vladimir Sementsov-Ogievskiy wrote: > backup-top "supports" write-unchanged, by skipping CBW operation in > backup_top_co_pwritev. But it forgets to do the same in > backup_top_co_pwrite_zeroes, as well as declare support for > BDRV_REQ_WRITE_UNCHANGED. > > Fix this, and, while being here, declare also support for flags > supported by source child. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > v3: rebase on master, keep state initialization after check top != NULL. > > v2: restrict flags propagation like it is done in other filters [Eric] > move state variable initialization to the top > block/backup-top.c | 31 ++++++++++++++++++++----------- > 1 file changed, 20 insertions(+), 11 deletions(-) > > diff --git a/block/backup-top.c b/block/backup-top.c > index fa78f3256d..1bfb360bd3 100644 > --- a/block/backup-top.c > +++ b/block/backup-top.c [...] > @@ -196,8 +200,13 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, > return NULL; > } > > - top->total_sectors = source->total_sectors; > state = top->opaque; > + top->total_sectors = source->total_sectors; This looks a bit accidental, but, well, whatever. Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block Max