[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] qcow2: Batch discards
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] qcow2: Batch discards |
Date: |
Mon, 17 Jun 2013 17:45:01 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 ;).
- [Qemu-devel] [PATCH 3/5] qcow2: Options to enable discard for freed clusters, (continued)
Re: [Qemu-devel] [PATCH 3/5] qcow2: Options to enable discard for freed clusters, Stefan Hajnoczi, 2013/06/17
[Qemu-devel] [PATCH 2/5] qcow2: Add refcount update reason to all callers, Kevin Wolf, 2013/06/13
[Qemu-devel] [PATCH 4/5] qcow2: Batch discards, Kevin Wolf, 2013/06/13
- Re: [Qemu-devel] [PATCH 4/5] qcow2: Batch discards,
Stefan Hajnoczi <=
[Qemu-devel] [PATCH 5/5] block: Always enable discard on the protocol level, Kevin Wolf, 2013/06/13
Re: [Qemu-devel] [PATCH 0/5] qcow2: Discard freed clusters, Wenchao Xia, 2013/06/17