Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-10-12 Thread Kevin Wolf
Am 12.10.2016 um 03:14 hat Fam Zheng geschrieben: > On Wed, 09/28 15:04, Fam Zheng wrote: > > Handling this is similar to what is done to the L2 entry in the case of > > compressed clusters. > > Kevin, Max, is there anything else I need to do before this patch can be > applied? Hm, actually, it l

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-10-11 Thread Fam Zheng
On Wed, 09/28 15:04, Fam Zheng wrote: > Handling this is similar to what is done to the L2 entry in the case of > compressed clusters. Kevin, Max, is there anything else I need to do before this patch can be applied? Fam

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-10-01 Thread Max Reitz
On 29.09.2016 10:10, Fam Zheng wrote: > On Thu, 09/29 09:58, Paolo Bonzini wrote: >> >> >> On 29/09/2016 04:21, Fam Zheng wrote: >>> On Wed, 09/28 18:11, Max Reitz wrote: Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but just "You may discard if it's easier for you". Bu

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-30 Thread Kevin Wolf
Am 30.09.2016 um 04:04 hat Fam Zheng geschrieben: > On Thu, 09/29 12:39, Kevin Wolf wrote: > > Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > > > On Thu, 09/29 11:29, Kevin Wolf wrote: > > > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > > > Handling this is similar to what is done

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 12:39, Kevin Wolf wrote: > Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > > On Thu, 09/29 11:29, Kevin Wolf wrote: > > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > > Handling this is similar to what is done to the L2 entry in the case of > > > > compressed clusters.

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 14:50, Paolo Bonzini wrote: > > > On 29/09/2016 14:48, Kevin Wolf wrote: >> Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: >>> On 29/09/2016 12:39, Kevin Wolf wrote: >> Because there is another check of pass-discard-request value in >> update_refcount: >> >>

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 14:48, Kevin Wolf wrote: > Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: >> On 29/09/2016 12:39, Kevin Wolf wrote: > Because there is another check of pass-discard-request value in > update_refcount: > > if (refcount == 0 && s->discard_passthrough[typ

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: > On 29/09/2016 12:39, Kevin Wolf wrote: > >> > Because there is another check of pass-discard-request value in > >> > update_refcount: > >> > > >> > if (refcount == 0 && s->discard_passthrough[type]) { > >> > update_refcoun

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 12:39, Kevin Wolf wrote: >> > >> > Because there is another check of pass-discard-request value in >> > update_refcount: >> > >> > if (refcount == 0 && s->discard_passthrough[type]) { >> > update_refcount_discard(bs, cluster_offset, s->cluster_size); >> >

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > On Thu, 09/29 11:29, Kevin Wolf wrote: > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > Handling this is similar to what is done to the L2 entry in the case of > > > compressed clusters. > > > > > > Signed-off-by: Fam Zheng > > > ---

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 11:29, Kevin Wolf wrote: > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > Handling this is similar to what is done to the L2 entry in the case of > > compressed clusters. > > > > Signed-off-by: Fam Zheng > > --- > > block/qcow2-cluster.c | 9 + > > block/qcow2.c

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Kevin Wolf
Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > Handling this is similar to what is done to the L2 entry in the case of > compressed clusters. > > Signed-off-by: Fam Zheng > --- > block/qcow2-cluster.c | 9 + > block/qcow2.c | 3 ++- > block/qcow2.h | 3 ++- > 3 files

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 09:58, Paolo Bonzini wrote: > > > On 29/09/2016 04:21, Fam Zheng wrote: > > On Wed, 09/28 18:11, Max Reitz wrote: > >> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but > >> just "You may discard if it's easier for you". But it's actually not > >> easier for us, s

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 04:21, Fam Zheng wrote: > On Wed, 09/28 18:11, Max Reitz wrote: >> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but >> just "You may discard if it's easier for you". But it's actually not >> easier for us, so I don't see why we're doing it. >> >> As far as I can

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-28 Thread Fam Zheng
On Wed, 09/28 18:11, Max Reitz wrote: > On 28.09.2016 09:04, Fam Zheng wrote: > > Handling this is similar to what is done to the L2 entry in the case of > > compressed clusters. > > > > Signed-off-by: Fam Zheng > > --- > > block/qcow2-cluster.c | 9 + > > block/qcow2.c | 3 ++- >

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-28 Thread Max Reitz
On 28.09.2016 09:04, Fam Zheng wrote: > Handling this is similar to what is done to the L2 entry in the case of > compressed clusters. > > Signed-off-by: Fam Zheng > --- > block/qcow2-cluster.c | 9 + > block/qcow2.c | 3 ++- > block/qcow2.h | 3 ++- > 3 files changed, 9

[Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-28 Thread Fam Zheng
Handling this is similar to what is done to the L2 entry in the case of compressed clusters. Signed-off-by: Fam Zheng --- block/qcow2-cluster.c | 9 + block/qcow2.c | 3 ++- block/qcow2.h | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/block/qcow2-