If a migration is already in progress and somebody attempts
to add a migration blocker, this should rightly fail.
Add an errp parameter and a retcode return value to migrate_add_blocker.
This is part one of two for a solution to prohibit e.g. block jobs
from running concurrently with migration.
On 30/09/2015 18:02, Jeff Cody wrote:
> As a general rule for blockjobs, I disagree.
>
> Right away, there is a key difference: we don't know that the image is
> (or should be) empty.
Not necessarily empty. sync='top' && mode='existing' &&
!target->backing_file, for example, makes sense if
On 09/30/2015 06:08 AM, Kevin Wolf wrote:
> Am 29.09.2015 um 22:20 hat John Snow geschrieben:
>> If a migration is already in progress and somebody attempts
>> to add a migration blocker, this should rightly fail.
>>
>> Add an errp parameter and a retcode return value to migrate_add_blocker.
>>
On Tue, Sep 29, 2015 at 04:54:10PM +0100, Richard W.M. Jones wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1265196
>
> The following command fails on an NFS mountpoint:
>
> $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144
> Formatting 'disk.img', fmt=qcow2
On 09/29/2015 09:54 AM, Richard W.M. Jones wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1265196
>
> The following command fails on an NFS mountpoint:
>
> $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144
> Formatting 'disk.img', fmt=qcow2 size=262144 encryption=off
This is simpler now that the driver has been converted to coroutines.
Signed-off-by: Paolo Bonzini
---
block/gluster.c | 86 ++---
1 file changed, 33 insertions(+), 53 deletions(-)
diff --git a/block/gluster.c
Simplify memory allocation by sticking with a single API. GSlice
is not that fast anyway (tcmalloc/jemalloc are better).
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.c | 4 ++--
hw/scsi/virtio-scsi-dataplane.c | 10 +-
hw/scsi/virtio-scsi.c
Kevin Wolf writes:
> Am 29.09.2015 um 22:20 hat John Snow geschrieben:
>> If a migration is already in progress and somebody attempts
>> to add a migration blocker, this should rightly fail.
>>
>> Add an errp parameter and a retcode return value to migrate_add_blocker.
>>
>>
Am 25.09.2015 um 19:19 hat Max Reitz geschrieben:
> As of 934659c460d46c948cf348822fda1d38556ed9a4, $QEMU_IO is generally no
> longer a program name, and therefore "sudo -n $QEMU_IO" will no longer
> work.
>
> Fix this by copying the qemu-io invocation function from common.config,
> making it use
Am 30.09.2015 um 18:06 hat Paolo Bonzini geschrieben:
>
>
> On 30/09/2015 18:02, Jeff Cody wrote:
> > As a general rule for blockjobs, I disagree.
> >
> > Right away, there is a key difference: we don't know that the image is
> > (or should be) empty.
>
> Not necessarily empty. sync='top' &&
Simplify memory allocation by sticking with a single API. GSlice
is not that fast anyway (tcmalloc/jemalloc are better).
Signed-off-by: Paolo Bonzini
---
block/io.c| 4 ++--
block/mirror.c| 4 ++--
block/raw-posix.c | 8
block/raw-win32.c
Simplify memory allocation by sticking with a single API. GSlice
is not that fast anyway (tcmalloc/jemalloc are better).
Signed-off-by: Paolo Bonzini
---
nbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nbd.c b/nbd.c
index 07240bd..74859cb
This cleans up the mess we left behind in the mirror code after the
previous patch. Instead of using bdrv_swap(), just change pointers.
The interface change of the mirror job that callers must consider is
that after job completion, their local BDS pointers still point to the
same node now.
Some block jobs change the block device graph on completion. This means
that the device that owns the job and originally was addressed with its
device name may no longer be what the corresponding BlockBackend points
to.
Previously, the effects of bdrv_swap() ensured that the job was (at
least
It allows changing the BlockDriverState that a BlockBackend points to.
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 17 +
include/block/block_int.h | 2 ++
2 files changed, 19 insertions(+)
diff --git a/block/block-backend.c
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block.c | 3 +++
include/block/block_int.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/block.c b/block.c
index f8e4631..9ff2b64 100644
--- a/block.c
+++ b/block.c
@@ -1090,6
After bdrv_swap(), some fields must be moved back to their original BDS
to compensate for the effects that a swap of the contents of the objects
has while keeping the old addresses. Other fields must be moved back
because they should logically be moved and must stay on top
When replacing
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/io.c| 2 +-
include/block/block_int.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/io.c b/block/io.c
index
It is unused now.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block.c | 34 --
include/block/block.h | 4
2 files changed, 38 deletions(-)
diff
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.
This patch removes the temporary duplication between bs->file and
bs->file_child by converting everything to BdrvChild.
Signed-off-by: Kevin Wolf
---
block.c | 63 ++-
block/blkdebug.c | 32
bdrv_swap() has always been an ugly hack that we would rather have
avoided. When it was introduced, we simply didn't have the
infrastructure to update pointers instead of transplanting the contents
of BDS object, so we grudgingly added bdrv_swap() as a quick solution.
Meanwhile, most of the
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block/blkverify.c | 41 +
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index d277e63..6b71622 100644
---
On Thu, Oct 01, 2015 at 03:35:15PM +0200, Paolo Bonzini wrote:
>
>
> On 01/10/2015 15:14, Jeff Cody wrote:
> > During mirror, if the target device does not support zero init, a
> > mirror may result in a corrupted image for sync="full" mode.
> >
> > This is due to how the initial dirty bitmap
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/vmdk.c | 99 +++-
1 file changed, 51 insertions(+), 48 deletions(-)
diff --git a/block/vmdk.c
This is the final step in converting all of the BlockDriverState
pointers that block drivers use to BdrvChild.
After this patch, bs->children contains the full list of child nodes
that are referenced by a given BDS, and these children are only
referenced through BdrvChild, so that updating the
During mirror, if the target device does not support zero init, a
mirror may result in a corrupted image for sync="full" mode.
This is due to how the initial dirty bitmap is set up prior to copying
data - we did not mark sectors as dirty that are unallocated. This
means those unallocated sectors
On 01/10/2015 15:14, Jeff Cody wrote:
> During mirror, if the target device does not support zero init, a
> mirror may result in a corrupted image for sync="full" mode.
>
> This is due to how the initial dirty bitmap is set up prior to copying
> data - we did not mark sectors as dirty that are
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/quorum.c | 63 ++
1 file changed, 33 insertions(+), 30 deletions(-)
diff --git a/block/quorum.c
Store the BdrvChild for bs->file. At this point, bs->file_child->bs just
duplicates the bs->file pointer. Later, it will completely replace it.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block.c
Similarly to BlockJobs, prohibit migration at least
during the synchronous phase of a transaction.
In particular, this guards internal and external
snapshots, which are implemented via transaction actions
through blockdev_do_action.
Signed-off-by: John Snow
---
blockdev.c |
requires:
[PATCH v2] migration: disallow migrate_add_blocker during migration
We don't want to allow migrations during sensitive
operations such as snapshots or mirroring. In conjunction
with the previous patch, we will also prohibit the
user from starting any block jobs while migrations
are
On 09/28/2015 01:38 PM, John Snow wrote:
> the 16bit ide data register is LE by definition.
>
> Signed-off-by: John Snow
> ---
> tests/ide-test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index
After the mirroring blockjob reaches synchronization,
allow migration to resume.
Signed-off-by: John Snow
---
block/mirror.c | 2 ++
blockjob.c | 5 +
include/block/blockjob.h | 8
3 files changed, 15 insertions(+)
diff --git
Unless we can prove this to be safe for specific cases,
the default should be to prohibit migration during BlockJobs.
In conjunction with
"migration: disallow_migrate_add_blocker during migration",
this should be sufficient to disallow the blockjob from starting
in the event of an in-progress
On 01/10/2015 18:34, John Snow wrote:
> +
> +error_setg(, "Block device(s) are in use by a Block
> Transaction");
s/Block Transaction/transaction command/
But how can migration start during a transaction?
> +ret = migrate_add_blocker(blocker, errp);
> +if (ret < 0) {
> +
The following changes since commit fa500928ad9da6dd570918e3dfca13c029af07a8:
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150930'
into staging (2015-10-01 10:49:38 +0100)
are available in the git repository at:
g...@github.com:codyprime/qemu-kvm-jtc.git
During mirror, if the target device does not support zero init, a
mirror may result in a corrupted image for sync="full" mode.
This is due to how the initial dirty bitmap is set up prior to copying
data - we did not mark sectors as dirty that are unallocated. This
means those unallocated sectors
On Thu, Oct 01, 2015 at 09:14:51AM -0400, Jeff Cody wrote:
> During mirror, if the target device does not support zero init, a
> mirror may result in a corrupted image for sync="full" mode.
>
> This is due to how the initial dirty bitmap is set up prior to copying
> data - we did not mark sectors
Am 30.09.2015 um 16:43 hat Jeff Cody geschrieben:
> On Tue, Sep 29, 2015 at 12:52:33PM +0200, Paolo Bonzini wrote:
> >
> >
> > On 29/09/2015 11:35, Kevin Wolf wrote:
> > > The caller could be copying the backing file in the background and it
> > > may not yet be finished.
> >
> > Yes, and this
On 17.09.2015 15:48, Kevin Wolf wrote:
> After bdrv_swap(), some fields must be moved back to their original BDS
> to compensate for the effects that a swap of the contents of the objects
> has while keeping the old addresses. Other fields must be moved back
> because they should logically be
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)
> >>> {
> >>> -
On Wed, Sep 30, 2015 at 05:26:28PM +0200, Kevin Wolf wrote:
> Am 30.09.2015 um 16:43 hat Jeff Cody geschrieben:
> > On Tue, Sep 29, 2015 at 12:52:33PM +0200, Paolo Bonzini wrote:
> > >
> > >
> > > On 29/09/2015 11:35, Kevin Wolf wrote:
> > > > The caller could be copying the backing file in the
Am 30.09.2015 um 17:11 hat Jeff Cody geschrieben:
> On Mon, Sep 28, 2015 at 04:23:16PM +0100, Stefan Hajnoczi wrote:
> > On Sun, Sep 27, 2015 at 11:29:18PM -0400, Jeff Cody wrote:
> > > +if (s->zero_cycle) {
> > > +ret = bdrv_get_block_status(s->target, sector_num, nb_sectors,
> > >
Am 29.09.2015 um 22:20 hat John Snow geschrieben:
> If a migration is already in progress and somebody attempts
> to add a migration blocker, this should rightly fail.
>
> Add an errp parameter and a retcode return value to migrate_add_blocker.
>
> This is part one of two for a solution to
Am 29.09.2015 um 17:54 hat Richard W.M. Jones geschrieben:
> https://bugzilla.redhat.com/show_bug.cgi?id=1265196
>
> The following command fails on an NFS mountpoint:
>
> $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144
> Formatting 'disk.img', fmt=qcow2 size=262144
On Mon, Sep 28, 2015 at 04:23:16PM +0100, Stefan Hajnoczi wrote:
> On Sun, Sep 27, 2015 at 11:29:18PM -0400, Jeff Cody wrote:
> > +if (s->zero_cycle) {
> > +ret = bdrv_get_block_status(s->target, sector_num, nb_sectors,
> > );
> > +if (!(ret & BDRV_BLOCK_ZERO)) {
> > +
On 17.09.2015 15:48, Kevin Wolf wrote:
> This cleans up the mess we left behind in the mirror code after the
> previous patch. Instead of using bdrv_swap(), just change pointers.
>
> The interface change of the mirror job that callers must consider is
> that after job completion, their local BDS
On Tue, Sep 29, 2015 at 12:52:33PM +0200, Paolo Bonzini wrote:
>
>
> On 29/09/2015 11:35, Kevin Wolf wrote:
> > The caller could be copying the backing file in the background and it
> > may not yet be finished.
>
> Yes, and this is permitted (the destination file of mirroring is opened
> with
On Fri 18 Sep 2015 05:22:59 PM CEST, Max Reitz wrote:
> Extract some of the blockdev option extraction code from blockdev_init()
> into its own function. This simplifies blockdev_init() and will allow
> reusing the code in a different function added in a follow-up patch.
>
>
On 30/09/2015 16:43, Jeff Cody wrote:
> One issue is that QEMU will do mode!='existing' && sync!='full' for
> drivers that do not support backing files (raw host devices, for
> instance).
Yup, this can be used to get a mirror of future operations (the idea was
to support things such as
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
On 29.09.2015 11:15, Alberto Garcia wrote:
> On Fri 18 Sep 2015 05:22:42 PM CEST, Max Reitz wrote:
>> If bdrv_is_inserted() is called on the top level BDS, it should make
>> sure all nodes in the BDS tree are actually inserted.
>>
>> Signed-off-by: Max Reitz
>> ---
>> block.c
On 29.09.2015 17:22, Kevin Wolf wrote:
> Am 23.09.2015 um 19:08 hat Max Reitz geschrieben:
>> On 17.09.2015 15:48, Kevin Wolf wrote:
>>> This cleans up the mess we left behind in the mirror code after the
>>> previous patch. Instead of using bdrv_swap(), just change pointers.
>>>
>>> The interface
54 matches
Mail list logo