[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 3/5] block: support compressed write for copy-on
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 3/5] block: support compressed write for copy-on-read |
Date: |
Wed, 15 Nov 2017 19:49:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 2017-11-14 11:16, Anton Nefedov wrote:
> Signed-off-by: Anton Nefedov <address@hidden>
> ---
> block/io.c | 30 ++++++++++++++++++++++++------
> block/trace-events | 2 +-
> 2 files changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/block/io.c b/block/io.c
> index 3d5ef2c..93c6b24 100644
> --- a/block/io.c
> +++ b/block/io.c
[...]
> @@ -1209,6 +1220,13 @@ int coroutine_fn bdrv_co_preadv(BdrvChild *child,
> return ret;
> }
>
> + /* write compressed only makes sense with copy on read */
> + if ((flags & BDRV_REQ_WRITE_COMPRESSED) &&
> + !(flags & BDRV_REQ_COPY_ON_READ))
> + {
> + return -EINVAL;
> + }
> +
I think the assertion in bdrv_aligned_preadv() should be enough, but
either way:
Reviewed-by: Max Reitz <address@hidden>
> bdrv_inc_in_flight(bs);
>
> /* Don't do copy-on-read if we read data before write operation */
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 1/5 for-2.11?] qcow2: reject unaligned offsets in write compressed, (continued)
- [Qemu-block] [PATCH 4/5] block-stream: add compress option, Anton Nefedov, 2017/11/14
- [Qemu-block] [PATCH 3/5] block: support compressed write for copy-on-read, Anton Nefedov, 2017/11/14
- Re: [Qemu-block] [PATCH 3/5] block: support compressed write for copy-on-read,
Max Reitz <=
- [Qemu-block] [PATCH 5/5] iotest 030: add compressed block-stream test, Anton Nefedov, 2017/11/14
- Re: [Qemu-block] [PATCH 0/5] compressed block-stream, Fam Zheng, 2017/11/15