On Fri, Dec 23, 2016 at 05:28:51PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> +            if (is_top || bdrv_has_zero_init(blk_bs(job->target))) {

  /*
   * Returns 1 if newly created images are guaranteed to contain
   * only zeros, 0 otherwise.
   */
  int (*bdrv_has_zero_init)(BlockDriverState *bs);

This function does not cover arbitrary images opened with bdrv_open(),
only those created with bdrv_img_create() immediately before opening.

This means that the check is only valid with backup->mode !=
NEW_IMAGE_MODE_EXISTING.

Attachment: signature.asc
Description: PGP signature

Reply via email to