On Tue, 06/14 15:30, Eric Blake wrote: > The raw block driver was blindly copying all limits from bs->file, > even though: 1. the main bdrv_refresh_limits() already does this > for many of gthe limits, and 2. blindly copying from the children
s/gthe/the ? > can weaken any stricter limits that were already inherited from > the backing dhain during the main bdrv_refresh_limits(). Also, > the next patch is about to move .request_alignment into > BlockLimits, and that is a limit that should NOT be copied from > other layers in the BDS chain. > > Solve the issue by factoring out a new bdrv_merge_limits(), > and using that function to properly merge limits when comparing > two BlockDriverState objects. > > Signed-off-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com>