On 2/11/21 11:22 AM, Max Reitz wrote: > mirror_top currently shares all permissions, and takes only the WRITE > permission (if some parent has taken that permission, too). > > That is wrong, though; mirror_top is a filter, so it should take > permissions like any other filter does. For example, if the parent > needs CONSISTENT_READ, we need to take that, too, and if it cannot share > the WRITE permission, we cannot share it either. > > The exception is when mirror_top is used for active commit, where we > cannot take CONSISTENT_READ (because it is deliberately unshared above > the base node) and where we must share WRITE (so that it is shared for > all images in the backing chain, so the mirror job can take it for the > target BB). > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/mirror.c | 32 +++++++++++++++++++++++++------- > 1 file changed, 25 insertions(+), 7 deletions(-) >
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org