block: Split bdrv_merge_limits() from bdrv_refresh_limits()
commitd9e0dfa2462e32cc5c6c49401ad7bff36453f75c
authorEric Blake <eblake@redhat.com>
Thu, 23 Jun 2016 22:37:23 +0000 (23 16:37 -0600)
committerKevin Wolf <kwolf@redhat.com>
Tue, 5 Jul 2016 14:46:26 +0000 (5 16:46 +0200)
treed287c65d3f4de478474e7d62f5d048e125bc22f4
parentad82be2f4feda6260d499cb923bf2a59d3838493
block: Split bdrv_merge_limits() from bdrv_refresh_limits()

During bdrv_merge_limits(), we were computing initial limits
based on another BDS in two places.  At first glance, the two
computations are not identical (one is doing straight copying,
the other is doing merging towards or away from zero) - but
when you realize that the first round is starting with all-0
memory, all of the merging happens to work.  Factoring out the
merging makes it easier to track how two BDS limits are merged,
in case we have future reasons to merge in even more limits.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c