Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-21 Thread jun muzi
Thanks. I will give a new version in v3 of qcow2 shrink. Jun Li 2014-9-3 上午1:12于 "Greg Kurz" 写道: > On Mon, 1 Sep 2014 18:52:48 +0800 > Jun Li wrote: > > > When every item of refcount block is NULL, free refcount block and reset > the > > corresponding item of refcount table with NULL. > > > > S

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-15 Thread Stefan Hajnoczi
On Sat, Sep 13, 2014 at 11:53:58PM +0800, Jun Li wrote: > On Fri, 09/05 16:33, Stefan Hajnoczi wrote: > > On Mon, Sep 01, 2014 at 06:52:48PM +0800, Jun Li wrote: > > > > How does this patch handle self-describing refcount blocks? I think > > they will keep the refcount block alive forever because

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-13 Thread Jun Li
On Fri, 09/05 16:33, Stefan Hajnoczi wrote: > On Mon, Sep 01, 2014 at 06:52:48PM +0800, Jun Li wrote: > > How does this patch handle self-describing refcount blocks? I think > they will keep the refcount block alive forever because your code will > not decide to free them. > Sorry, I have ignor

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-09 Thread Jun Li
On Tue, 09/09 10:21, Kevin Wolf wrote: > Am 09.09.2014 um 04:52 hat Jun Li geschrieben: > > On Fri, 09/05 12:21, Kevin Wolf wrote: > > > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > > > When every item of refcount block is NULL, free refcount block and > > > > reset the > > > > corresponding

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-09 Thread Kevin Wolf
Am 09.09.2014 um 04:52 hat Jun Li geschrieben: > On Fri, 09/05 12:21, Kevin Wolf wrote: > > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > > When every item of refcount block is NULL, free refcount block and reset > > > the > > > corresponding item of refcount table with NULL. > > > > > > Sig

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-08 Thread Jun Li
On Fri, 09/05 12:21, Kevin Wolf wrote: > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > When every item of refcount block is NULL, free refcount block and reset the > > corresponding item of refcount table with NULL. > > > > Signed-off-by: Jun Li > > The commit message should also describe w

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-05 Thread Stefan Hajnoczi
On Mon, Sep 01, 2014 at 06:52:48PM +0800, Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- By the way, test cases are definitely needed for this change. See tests/qemu-i

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-05 Thread Stefan Hajnoczi
On Mon, Sep 01, 2014 at 06:52:48PM +0800, Jun Li wrote: How does this patch handle self-describing refcount blocks? I think they will keep the refcount block alive forever because your code will not decide to free them. This patch should also discard the refcount block if we decide to free it (i

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-05 Thread Kevin Wolf
Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li The commit message should also describe why this is a relevant improvement for some use case.

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-02 Thread Greg Kurz
On Mon, 1 Sep 2014 18:52:48 +0800 Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- > > The v2 do following change to modify some potential issue. > > +--

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-02 Thread Benoît Canet
The Tuesday 02 Sep 2014 à 00:04:08 (+0800), Jun Li wrote : > On Mon, 09/01 13:11, Benoît Canet wrote: > > The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > > > When every item of refcount block is NULL, free refcount block and reset > > > the > > > corresponding item of refcount table wi

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Jun Li
On Mon, 09/01 13:11, Benoît Canet wrote: > The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > > When every item of refcount block is NULL, free refcount block and reset the > > corresponding item of refcount table with NULL. > > > > Signed-off-by: Jun Li > > --- > > > > The v2 do follow

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Benoît Canet
The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- > > The v2 do following change to modify some potential issue. > >

[Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. Signed-off-by: Jun Li --- The v2 do following change to modify some potential issue. +--- Here should start from "0". | for (k = 0; k <