[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH v2 6/7] block-backend: Add blk_co_copy_range
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [RFC PATCH v2 6/7] block-backend: Add blk_co_copy_range |
Date: |
Thu, 3 May 2018 11:28:19 +0100 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, Apr 18, 2018 at 11:04:23AM +0800, Fam Zheng wrote:
> It's a BlockBackend wrapper of the BDS interface.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> block/block-backend.c | 9 +++++++++
> include/sysemu/block-backend.h | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/block/block-backend.c b/block/block-backend.c
> index 681b240b12..2a984b1864 100644
> --- a/block/block-backend.c
> +++ b/block/block-backend.c
> @@ -2217,3 +2217,12 @@ void blk_unregister_buf(BlockBackend *blk, void *host)
> {
> bdrv_unregister_buf(blk_bs(blk), host);
> }
> +
> +int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
> + BlockBackend *blk_out, int64_t off_out,
> + int bytes, BdrvRequestFlags flags)
> +{
> + return bdrv_co_copy_range(blk_in->root, off_in,
> + blk_out->root, off_out,
> + bytes, flags);
> +}
What happens if either ->root field is NULL?
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-block] [RFC PATCH v2 6/7] block-backend: Add blk_co_copy_range,
Stefan Hajnoczi <=