[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 2/8] block/cor: Drop cor_co_truncate()
From: |
Maxim Levitsky |
Subject: |
Re: [Qemu-block] [PATCH 2/8] block/cor: Drop cor_co_truncate() |
Date: |
Wed, 18 Sep 2019 23:49:57 +0300 |
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote:
> No other filter driver has a .bdrv_co_truncate() implementation, and
> there is no need to because the general block layer code can handle it
> just as well.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/copy-on-read.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/block/copy-on-read.c b/block/copy-on-read.c
> index 6631f30205..e95223d3cb 100644
> --- a/block/copy-on-read.c
> +++ b/block/copy-on-read.c
> @@ -73,13 +73,6 @@ static int64_t cor_getlength(BlockDriverState *bs)
> }
>
>
> -static int coroutine_fn cor_co_truncate(BlockDriverState *bs, int64_t offset,
> - PreallocMode prealloc, Error **errp)
> -{
> - return bdrv_co_truncate(bs->file, offset, prealloc, errp);
> -}
> -
> -
> static int coroutine_fn cor_co_preadv(BlockDriverState *bs,
> uint64_t offset, uint64_t bytes,
> QEMUIOVector *qiov, int flags)
> @@ -139,7 +132,6 @@ static BlockDriver bdrv_copy_on_read = {
> .bdrv_child_perm = cor_child_perm,
>
> .bdrv_getlength = cor_getlength,
> - .bdrv_co_truncate = cor_co_truncate,
>
> .bdrv_co_preadv = cor_co_preadv,
> .bdrv_co_pwritev = cor_co_pwritev,
Reviewed-by: Maxim Levitsky <address@hidden>
Best regards,
Maxim Levitsky
- [Qemu-block] [PATCH 0/8] block: Add @exact parameter to bdrv_co_truncate(), Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 1/8] block: Handle filter truncation like native impl., Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 2/8] block/cor: Drop cor_co_truncate(), Max Reitz, 2019/09/18
- Re: [Qemu-block] [PATCH 2/8] block/cor: Drop cor_co_truncate(),
Maxim Levitsky <=
- [Qemu-block] [PATCH 3/8] block: Do not truncate file node when formatting, Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 5/8] block: Evaluate @exact in protocol drivers, Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 4/8] block: Add @exact parameter to bdrv_co_truncate(), Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 6/8] block: Let format drivers pass @exact, Max Reitz, 2019/09/18
- [Qemu-block] [PATCH 7/8] block: Pass truncate exact=true where reasonable, Max Reitz, 2019/09/18