Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-10-01 Thread Kevin Wolf
Am 30.09.2015 um 16:45 hat Max Reitz geschrieben: > On 29.09.2015 15:51, Kevin Wolf wrote: > > Am 23.09.2015 um 18:36 hat Max Reitz geschrieben: > >> On 17.09.2015 15:48, Kevin Wolf wrote: > >>> void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top) > >>> { > >>> -

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-10-01 Thread Max Reitz
On 29.09.2015 15:51, Kevin Wolf wrote: > Am 23.09.2015 um 18:36 hat Max Reitz geschrieben: >> On 17.09.2015 15:48, Kevin Wolf wrote: >>> Remember all parent nodes and just change the pointers there instead of >>> swapping the contents of the BlockDriverState. >>> >>> Handling of snapshot=on must

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-29 Thread Kevin Wolf
Am 23.09.2015 um 18:36 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > Remember all parent nodes and just change the pointers there instead of > > swapping the contents of the BlockDriverState. > > > > Handling of snapshot=on must be moved further down in bdrv_open() > >

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Remember all parent nodes and just change the pointers there instead of > swapping the contents of the BlockDriverState. > > Handling of snapshot=on must be moved further down in bdrv_open() > because *pbs (which is the bs pointer in the BlockBackend) must

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote: > +static void swap_feature_fields(BlockDriverState *bs_top, > +BlockDriverState *bs_new) > +{ > +BlockDriverState tmp; > + > +bdrv_move_feature_fields(, bs_top); > +bdrv_move_feature_fields(bs_top,

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Kevin Wolf
Am 18.09.2015 um 13:45 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote: > > > +static void swap_feature_fields(BlockDriverState *bs_top, > > +BlockDriverState *bs_new) > > +{ > > +BlockDriverState tmp; > > + > > +

Re: [Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Alberto Garcia
On Fri 18 Sep 2015 02:24:21 PM CEST, Kevin Wolf wrote: >> > +static void swap_feature_fields(BlockDriverState *bs_top, >> > +BlockDriverState *bs_new) >> > +{ >> > +BlockDriverState tmp; >> > + >> > +bdrv_move_feature_fields(, bs_top); >> > +

[Qemu-block] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-17 Thread Kevin Wolf
Remember all parent nodes and just change the pointers there instead of swapping the contents of the BlockDriverState. Handling of snapshot=on must be moved further down in bdrv_open() because *pbs (which is the bs pointer in the BlockBackend) must already be set before bdrv_append() is called.