On Thu, Jun 13, 2013 at 01:47:42PM +0200, Kevin Wolf wrote:
> @@ -420,6 +420,77 @@ fail_block:
>      return ret;
>  }
>  
> +void qcow2_process_discards(BlockDriverState *bs, int ret)
> +{
> +    BDRVQcowState *s = bs->opaque;
> +    Qcow2DiscardRegion *d, *next;
> +
> +    QTAILQ_FOREACH_SAFE(d, &s->discards, next, next) {
> +        QTAILQ_REMOVE(&s->discards, d, next);
> +
> +        /* Discard is optional, ignore the return value */
> +        if (ret >= 0) {
> +            fprintf(stderr, "discard: %lx + %lx\n",
> +                         d->offset >> BDRV_SECTOR_BITS,
> +                         d->bytes >> BDRV_SECTOR_BITS);
Debug code.  This doesn't happen with --enable-trace-backend=stderr ;).

Reply via email to