[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof |
Date: |
Fri, 10 Jun 2016 16:41:16 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/10/2016 10:05 AM, Kevin Wolf wrote:
> It is always true for open images now.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 2 --
> block/io.c | 51
> +++++++++++++++++++++--------------------------
> include/block/block_int.h | 3 ---
> 3 files changed, 23 insertions(+), 33 deletions(-)
>
> +++ b/block/io.c
> @@ -1000,40 +1000,35 @@ static int coroutine_fn
> bdrv_aligned_preadv(BlockDriverState *bs,
> }
>
> /* Forward the request to the BlockDriver */
> - if (!bs->zero_beyond_eof) {
> - ret = bdrv_driver_preadv(bs, offset, bytes, qiov, 0);
> - } else {
> - /* Read zeros after EOF */
> - int64_t total_bytes, max_bytes;
> + int64_t total_bytes, max_bytes;
This declaration is now in the middle of the function. Shouldn't you
hoist it to the beginning?
That's minor enough to fix on pull request, so:
Reviewed-by: Eric Blake <address@hidden>
I'll rebase my pending byte-based BlockLimits series on top of this.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 4/6] block: Make bdrv_load/save_vmstate coroutine_fns, (continued)
- [Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof, Kevin Wolf, 2016/06/10
- Re: [Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof,
Eric Blake <=
- Re: [Qemu-devel] [PATCH 0/6] block: bdrv_load/save_vmstate() cleanups, Fam Zheng, 2016/06/11
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/6] block: bdrv_load/save_vmstate() cleanups, Stefan Hajnoczi, 2016/06/16
- Re: [Qemu-devel] [PATCH 0/6] block: bdrv_load/save_vmstate() cleanups, Kevin Wolf, 2016/06/16