Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-05 Thread Stefano Stabellini
On Tue, 4 Feb 2014, Olaf Hering wrote: On Tue, Feb 04, Olaf Hering wrote: On Tue, Feb 04, Kevin Wolf wrote: Now you call bdrv_acct_done() in the callback without having a matching bdrv_acct_start(). You need to make it conditional in the callback. Stefano, Is

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-04 Thread Stefano Stabellini
On Tue, 4 Feb 2014, Olaf Hering wrote: On Mon, Feb 03, Kevin Wolf wrote: Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: +++ b/hw/block/xen_disk.c +case BLKIF_OP_DISCARD: +{ +struct blkif_request_discard *discard_req = (void *)ioreq-req; +

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-04 Thread Olaf Hering
On Tue, Feb 04, Olaf Hering wrote: On Tue, Feb 04, Kevin Wolf wrote: Now you call bdrv_acct_done() in the callback without having a matching bdrv_acct_start(). You need to make it conditional in the callback. Stefano, Is ioreq_runio_qemu_aio symetric in this regard anyway? In case of

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-04 Thread Olaf Hering
On Mon, Feb 03, Kevin Wolf wrote: Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: +++ b/hw/block/xen_disk.c +case BLKIF_OP_DISCARD: +{ +struct blkif_request_discard *discard_req = (void *)ioreq-req; +bdrv_acct_start(blkdev-bs, ioreq-acct, +

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-04 Thread Olaf Hering
On Tue, Feb 04, Kevin Wolf wrote: Now you call bdrv_acct_done() in the callback without having a matching bdrv_acct_start(). You need to make it conditional in the callback. I see. Stefano, Is ioreq_runio_qemu_aio symetric in this regard anyway? In case of

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-04 Thread Kevin Wolf
Am 04.02.2014 um 16:47 hat Olaf Hering geschrieben: On Mon, Feb 03, Kevin Wolf wrote: Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: +++ b/hw/block/xen_disk.c +case BLKIF_OP_DISCARD: +{ +struct blkif_request_discard *discard_req = (void *)ioreq-req; +

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-03 Thread Kevin Wolf
Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: Implement discard support for xen_disk. It makes use of the existing discard code in qemu. The discard support is enabled unconditionally. The tool stack may provide a property discard-enable in the backend node to optionally disable

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-03 Thread Paolo Bonzini
Il 03/02/2014 16:49, Kevin Wolf ha scritto: Neither SCSI nor IDE account for discards. I think we should keep the behaviour consistent across devices. If we do want to introduce accounting for discards, I'm not sure whether counting them as writes or giving them their own category makes more

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-03 Thread Kevin Wolf
Am 03.02.2014 um 17:03 hat Olaf Hering geschrieben: On Mon, Feb 03, Kevin Wolf wrote: Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: +case BLKIF_OP_DISCARD: +{ +struct blkif_request_discard *discard_req = (void *)ioreq-req; +bdrv_acct_start(blkdev-bs,

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-02-03 Thread Olaf Hering
On Mon, Feb 03, Kevin Wolf wrote: Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben: +case BLKIF_OP_DISCARD: +{ +struct blkif_request_discard *discard_req = (void *)ioreq-req; +bdrv_acct_start(blkdev-bs, ioreq-acct, +

Re: [Qemu-devel] [PATCH] xen_disk: add discard support

2014-01-30 Thread Stefano Stabellini
On Thu, 30 Jan 2014, Olaf Hering wrote: Implement discard support for xen_disk. It makes use of the existing discard code in qemu. The discard support is enabled unconditionally. The tool stack may provide a property discard-enable in the backend node to optionally disable discard support.

[Qemu-devel] [PATCH] xen_disk: add discard support

2014-01-30 Thread Olaf Hering
Implement discard support for xen_disk. It makes use of the existing discard code in qemu. The discard support is enabled unconditionally. The tool stack may provide a property discard-enable in the backend node to optionally disable discard support. This is helpful in case the backing file was