qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v19 09/16] block: Support dropping active in bdr


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v19 09/16] block: Support dropping active in bdrv_drop_intermediate
Date: Tue, 20 May 2014 11:53:12 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 05/19 13:38, Eric Blake wrote:
> On 05/11/2014 07:35 PM, Fam Zheng wrote:
> > Dropping intermediate could be useful both for commit and stream, and
> > BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs
> > to work with op blockers.
> > 
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  block.c        | 139 
> > ++++++++++++++++++++++++++++-----------------------------
> >  block/commit.c |   2 +-
> >  2 files changed, 70 insertions(+), 71 deletions(-)
> > 
> 
> > -
> >  /*
> > - * Drops images above 'base' up to and including 'top', and sets the image
> > - * above 'top' to have base as its backing file.
> > + * Drops images above 'base' up to and including 'top', and sets new 
> > 'base' as
> > + * backing_hd of top's overlay (the image orignally has 'top' as backing 
> > file).
> > + * top's overlay may be NULL if 'top' is active, no such update needed.
> > + * Requires that the top's overlay to 'top' is opened r/w.
> > + *
> > + * 1) This will convert the following chain:
> > + *
> > + *     ... <- base <- ... <- top <- overlay <-... <- active
> >   *
> > - * Requires that the overlay to 'top' is opened r/w, so that the backing 
> > file
> > - * information in 'bs' can be properly updated.
> > + * to
> > + *
> > + *     ... <- base <- overlay <- active
> 
> Jeff is working on allowing the user full control over the string
> written into overlay; let's make sure these efforts are coordinated.
> https://lists.gnu.org/archive/html/qemu-devel/2014-05/msg02949.html

Looks they are not exclusive functional changes, I can rebase if it is merged
before this.

> 
> > + *
> > + * 2) It is allowed for bottom==base, in which case it converts:
> >   *
> > - * E.g., this will convert the following chain:
> > - * bottom <- base <- intermediate <- top <- active
> > + *     base <- ... <- top <- overlay <- ... <- active
> >   *
> >   * to
> >   *
> > - * bottom <- base <- active
> > + *     base <- overlay <- active
> >   *
> > - * It is allowed for bottom==base, in which case it converts:
> > + * 2) It also allows active==top, in which case it converts:
> 
> Shouldn't this be 3) ?

Yes, thanks!

> 
> >   *
> > - * base <- intermediate <- top <- active
> > + *     ... <- base <- ... <- top (active)
> >   *
> >   * to
> >   *
> > - * base <- active
> > + *     ... <- base == active == top
> > + *
> > + * i.e. only base and lower remains: *top == *base when return.
> > + *
> > + * 3) If base==NULL, it will drop all the BDS below overlay and set its
> 
> and 4)
> 

Yes, thanks!

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]