[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: fix alignment calculati
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: fix alignment calculations in bdrv_co_do_zero_pwritev |
Date: |
Wed, 26 Apr 2017 08:21:18 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 04/26/2017 03:40 AM, Denis V. Lunev wrote:
> tail_padding_bytes is calculated wrong. F.e. for
> offset = 0
> bytes = 2048
> align = 512
> we will have tail_padding_bytes = 512 which is definitely wrong. The patch
> fixes that arithmetics.
>
> Fortunately this problem is harmless, we will have 1 extra allocation and
> free thus there is no need to put this into stable. The problem is here
> from the very beginning.
>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: Fam Zheng <address@hidden>
> ---
> block/io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature