From: Paolo Bonzini
Build the addresses and s/g lists on the stack, and then copy them
to a VirtQueueElement that is just as big as required to contain this
particular s/g list. The cost of the copy is minimal compared to that
of a large malloc.
Reviewed-by: Cornelia Huck
From: Paolo Bonzini
The return code of virtqueue_pop/vring_pop is unused except to check for
errors or 0. We can thus easily move allocation inside the functions
and just return a pointer to the VirtQueueElement.
The advantage is that we will be able to allocate only the
From: Paolo Bonzini
Move allocation to virtio functions also when loading/saving a
VirtQueueElement. This will also let the load/save functions
keep backwards compatibility when the VirtQueueElement layout
is changed.
Reviewed-by: Cornelia Huck
On Fri, Feb 05, 2016 at 12:52:55PM +, Peter Maydell wrote:
> On 4 February 2016 at 21:51, Michael S. Tsirkin wrote:
> > From: Paolo Bonzini
> >
> > The return code of virtqueue_pop/vring_pop is unused except to check for
> > errors or 0. We can thus
On Sat, Feb 06, 2016 at 02:04:23PM +0100, Max Reitz wrote:
> On 04.02.2016 18:36, Alyssa Milburn wrote:
> > This avoids a 'change' command from the monitor unlink()ing the new
> > file if the bdrv was previously snapshotted.
> >
> > Signed-off-by: Alyssa Milburn
> > ---
> >
On 05.02.2016 03:00, Fam Zheng wrote:
> The "pnum < nb_sectors" condition in deciding whether to actually copy
> data is unnecessarily strict, and the qiov initialization is
> unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard.
>
> Rewrite mirror_iteration to fix both flaws.
>
> The
Most importantly, this removes BDRV_O_TEMPORARY, to avoid unlink()ing an
image which replaces a snapshotted one.
Signed-off-by: Alyssa Milburn
---
blockdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index be4ca44..a916b06 100644
---