[pve-devel] copy_vm: new option -target

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Thu May 2 14:06:39 CEST 2013


great idea - but who knows if the target i really zero init or not? so
if somebody generally uses qemu-img and copy on top of an existing disk
this is not correct...

Stefan

Am 02.05.2013 13:47, schrieb Alexandre DERUMIER:
> I'll test this:
> 
> 
> From 1b3f5a7812b0dd750e5010441708fee1a6117318 Mon Sep 17 00:00:00 2001
> From: Alexandre Derumier <aderumier at odiso.com>
> Date: Thu, 2 May 2013 13:43:45 +0200
> Subject: [PATCH] rbd : add .bdrv_has_zero_init
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  block/rbd.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/block/rbd.c b/block/rbd.c
> index 8cd10a7..d545ebc 100644
> --- a/block/rbd.c
> +++ b/block/rbd.c
> @@ -287,6 +287,11 @@ static int qemu_rbd_set_conf(rados_t cluster, const char *conf)
>      return ret;
>  }
>  
> +static int qemu_rbd_has_zero_init(BlockDriverState *bs)
> +{
> +    return 1;
> +}
> +
>  static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options)
>  {
>      int64_t bytes = 0;
> @@ -958,6 +963,8 @@ static BlockDriver bdrv_rbd = {
>      .bdrv_snapshot_delete   = qemu_rbd_snap_remove,
>      .bdrv_snapshot_list     = qemu_rbd_snap_list,
>      .bdrv_snapshot_goto     = qemu_rbd_snap_rollback,
> +    .bdrv_has_zero_init     = qemu_rbd_has_zero_init,
> +
>  };
>  
>  static void bdrv_rbd_init(void)
> 



More information about the pve-devel mailing list