On 06/22/2016 01:51 PM, John Snow wrote:
> mirror_do_read intends to return the number of sectors processed after
> the starting sector, without regard to how many sectors were processed
> before the starting sector due to alignment.
> 

Eventually, we may want this to be in terms of bytes instead of sectors;
but for now the new wording is an improvement.

> Clean up the comments and code to hopefully illustrate this more clearly.
> 
> This also fixes an issue in initialization where if the mirror buffer size
> is initialized to smaller than the number of sectors being requested for
> transfer, we report back an incorrectly large number to the caller.
> 
> Signed-off-by: John Snow <js...@redhat.com>
> ---
>  block/mirror.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to