So that NBD export cannot submit IO during bdrv_drain_all().
Signed-off-by: Fam Zheng f...@redhat.com
---
nbd.c | 24
1 file changed, 24 insertions(+)
diff --git a/nbd.c b/nbd.c
index 06b501b..b5026af 100644
--- a/nbd.c
+++ b/nbd.c
@@ -160,6 +160,8 @@ struct NBDExport {
BDS users can register a notifier and get notified about op blocker
changes.
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block.c | 35 +++
include/block/block.h | 8
v5: Patch 13: set blocker before bdrv_drain().
v4: virtio-scsi-dataplane: Use assert in ctrl/event queue handler. [Paolo]
Protect mirror complete in new patch 13. [Wen]
Add Max's rev-by in 02, 03, 04.
Fix 05, 06 per Max's comments.
Reported by Paolo.
Unlike the iohandler in main
Should more ops be added to differentiate code between dataplane and
non-dataplane, the new saved_ops approach will be cleaner than messing
with N pointers.
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
---
hw/block/dataplane/virtio-blk.c | 13 -
Forward the call to bdrv_op_blocker_add_notifier.
Signed-off-by: Fam Zheng f...@redhat.com
Reviewed-by: Max Reitz mre...@redhat.com
---
block/block-backend.c | 6 ++
include/sysemu/block-backend.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/block/block-backend.c
On Wed, 05/20 08:26, Paolo Bonzini wrote:
On 19/05/2015 17:02, Stefan Hajnoczi wrote:
1. Convert everything like you converted qemu-nbd.c. This is a
conservative approach and we can be confident that behavior is
unchanged.
So, that means whenever you change receive_disabled you
It blocks device IO.
All bdrv_op_block_all/blk_op_block_all callers are taken care of:
- virtio_blk_data_plane_create
- virtio_scsi_hotplug
Device creation, unblock it.
- bdrv_set_backing_hd
Backing hd is not used by device, so blocking is OK.
- backup_start
Blocking target when
When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care
of protecting the block device with op blockers. Currently we haven't
enabled block jobs (like what's done in virtio_blk_data_plane_create),
but it is necessary to honor device IO op blocker first before we do.
This is useful
On 20/05/2015 08:16, Fam Zheng wrote:
static void mirror_exit(BlockJob *job, void *opaque)
@@ -328,6 +330,8 @@ static void mirror_exit(BlockJob *job, void *opaque)
MirrorExitData *data = opaque;
AioContext *replace_aio_context = NULL;
+bdrv_op_unblock(s-common.bs,
On Wed, 05/20 08:32, Paolo Bonzini wrote:
On 20/05/2015 08:16, Fam Zheng wrote:
static void mirror_exit(BlockJob *job, void *opaque)
@@ -328,6 +330,8 @@ static void mirror_exit(BlockJob *job, void *opaque)
MirrorExitData *data = opaque;
AioContext *replace_aio_context =
virtio-blk now listens to op blocker change of the associated block
backend.
Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO:
non-dataplane:
1) Set VirtIOBlock.paused
2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused
dataplane:
1) Clear the host event notifier
Signed-off-by: Fam Zheng f...@redhat.com
---
blockdev.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 7f763d9..923fc90 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1404,6 +1404,7 @@ typedef struct ExternalSnapshotState {
Signed-off-by: Fam Zheng f...@redhat.com
---
blockdev.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 5eaf77e..7f763d9 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1262,6 +1262,7 @@ typedef struct InternalSnapshotState {
We don't want new requests from guest, so block the operation around the
nested poll.
It also avoids looping forever when iothread is submitting a lot of requests.
Signed-off-by: Fam Zheng f...@redhat.com
---
block/io.c | 22 --
1 file changed, 20 insertions(+), 2
When mirror should complete, the source and target are in sync. But we
call bdrv_swap() only a while later in the main loop bh. If the guest
writes something before that, target will not get the new data.
Block device IO before bdrv_drain and unblock it after bdrw_swap().
Reported-by: Wen
Am 19.05.2015 um 22:40 hat John Snow geschrieben:
On 05/19/2015 11:36 AM, Kevin Wolf wrote:
The RQM bit in MSR should be set whenever the guest is supposed to
access the FIFO, and it should be cleared in all other cases. This is
important so the guest can't continue writing/reading the
Until now, an SG device was identified only by checking if its path
started with /dev/sg. Then, hdev_open() set bs-sg accordingly.
This is very fragile, e.g. it fails with symlinks or relative paths.
We should rely on the actual properties of the device instead of the
specified file path.
Test
On 05/20/2015 04:25 AM, Kevin Wolf wrote:
Am 19.05.2015 um 22:40 hat John Snow geschrieben:
On 05/19/2015 11:36 AM, Kevin Wolf wrote:
This commit makes similar improvements as have already been made to the
write function: Instead of relying on a flag in the MSR to distinguish
controller
On Wed 20 May 2015 12:05:55 PM CEST, Kevin Wolf kw...@redhat.com wrote:
Suggested-by: Markus Armbruster arm...@redhat.com
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Alberto Garcia be...@igalia.com
Berto
On Tue, May 19, 2015 at 11:37:32AM -0400, John Snow wrote:
On Mon, May 18, 2015 at 06:22:22PM +0200, Max Reitz wrote:
On 12.05.2015 01:04, John Snow wrote:
[. . .]
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 7506774..363126a 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
On 05/20/2015 05:24 AM, Peter Maydell wrote:
On 20 May 2015 at 09:43, Kevin Wolf kw...@redhat.com wrote:
Am 20.05.2015 um 10:06 hat Peter Maydell geschrieben:
That handles migration, which is good. But I still think that
storing the same information in two places in the device
state (phase
Kevin and Stefan asked me to take care of this part.
Signed-off-by: Markus Armbruster arm...@redhat.com
---
MAINTAINERS | 8
1 file changed, 8 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index b3552b2..8df0c6a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -812,6 +812,14 @@ F:
On 05/20/2015 04:14 AM, Kevin Wolf wrote:
Am 19.05.2015 um 22:40 hat John Snow geschrieben:
On 05/19/2015 11:36 AM, Kevin Wolf wrote:
The RQM bit in MSR should be set whenever the guest is supposed to
access the FIFO, and it should be cleared in all other cases. This is
important so the
On Tue, May 19, 2015 at 06:15:23PM -0400, John Snow wrote:
On 05/18/2015 11:45 AM, Stefan Hajnoczi wrote:
On Mon, May 11, 2015 at 07:04:21PM -0400, John Snow wrote:
If we want to get at the job after the life of the job,
we'll need a refcount for this object.
This may occur for example
Am 19.05.2015 um 22:40 hat John Snow geschrieben:
On 05/19/2015 11:36 AM, Kevin Wolf wrote:
This commit makes similar improvements as have already been made to the
write function: Instead of relying on a flag in the MSR to distinguish
controller phases, use the explicit phase that we
Building the QEMU tools fails if we #define DEBUG_BLOCK inside
block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y
so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with
a simple DPRINTF() (that does not cause bit-rot).
Signed-off-by: Dimitris Aragiorgis
Hi all,
These four patches make slight changes to the way QEMU handles SCSI
generic devices to fix a number of small problems.
I am sending them against the master branch, since I don't know if they
can be considered bugfixes.
Thanks,
dimara
v4 (rebased to current master):
* Avoid errno
Am 20.05.2015 um 10:06 hat Peter Maydell geschrieben:
On 20 May 2015 at 08:54, Kevin Wolf kw...@redhat.com wrote:
Am 19.05.2015 um 22:57 hat Peter Maydell geschrieben:
Yeah, if there's genuinely an underlying state machine that's
not completely visible in registers you need to actually
Instead of checking bs-sg use bdrv_is_sg() consistently throughout
the code.
Signed-off-by: Dimitris Aragiorgis dim...@arrikto.com
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
---
block.c |6 +++---
block/iscsi.c |2 +-
block/raw-posix.c |4 ++--
3 files changed, 6
During migration, QEMU uses fsync()/fdatasync() on the open file
descriptor for read-write block devices to flush data just before
stopping the VM.
However, fsync() on a scsi-generic device returns -EINVAL which
causes the migration to fail. This patch skips flushing data in case
of an SG device,
Get rid of several #ifdef DEBUG_FLOPPY and substitute them with
DPRINTF.
Signed-off-by: Dimitris Aragiorgis dim...@arrikto.com
---
block/raw-posix.c | 22 +-
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index
On Wed, May 20, 2015 at 8:39 AM, Paolo Bonzini pbonz...@redhat.com wrote:
On 20/05/2015 08:38, Fam Zheng wrote:
On Wed, 05/20 08:26, Paolo Bonzini wrote:
On 19/05/2015 17:02, Stefan Hajnoczi wrote:
1. Convert everything like you converted qemu-nbd.c. This is a
conservative approach and we
Suggested-by: Markus Armbruster arm...@redhat.com
Signed-off-by: Kevin Wolf kw...@redhat.com
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index b3552b2..9ff7c36 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -785,6 +785,7 @@ S: Supported
F: block*
On 20 May 2015 at 09:43, Kevin Wolf kw...@redhat.com wrote:
Am 20.05.2015 um 10:06 hat Peter Maydell geschrieben:
That handles migration, which is good. But I still think that
storing the same information in two places in the device
state (phase field and the register fields) is error-prone.
On Fri 08 May 2015 10:06:35 PM CEST, Eric Blake wrote:
+for (i = 0; i UINT_MAX; i++) {
+QObject *subqobj;
+int subqdict_entries;
+size_t slen = 32 + subqdict_len;
+char indexstr[slen], prefix[slen];
And more dependence on a working C99 compiler, thanks
On 05/20/2015 05:23 AM, Markus Armbruster wrote:
Kevin and Stefan asked me to take care of this part.
Signed-off-by: Markus Armbruster arm...@redhat.com
---
MAINTAINERS | 8
1 file changed, 8 insertions(+)
Reviewed-by: Eric Blake ebl...@redhat.com
diff --git a/MAINTAINERS
Replace uses of g_test_add_data_func() for QTest test cases.
It is still valid to use it for any non-QTest test cases,
which are not run for multiple target binaries.
Suggested-by: John Snow js...@redhat.com
Reviewed-by: John Snow js...@redhat.com
Signed-off-by: Andreas Färber afaer...@suse.de
On 05/21/2015 03:18 AM, Dr. David Alan Gilbert wrote:
* Wen Congyang (we...@cn.fujitsu.com) wrote:
Block replication is a very important feature which is used for
continuous checkpoints(for example: COLO).
Usage:
Please refer to docs/block-replication.txt
You can get the patch here:
When opening BDS, we need to create backup jobs for
image-fleecing.
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
Cc: Jeff Cody jc...@redhat.com
---
block/Makefile.objs | 2 +-
1 file
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
---
block.c | 12
1 file changed, 12 insertions(+)
diff --git a/block.c b/block.c
index 74fd3d6..961e395 100644
--- a/block.c
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
---
block/Makefile.objs | 1 +
block/replication.c | 441
2 files changed, 442
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
Cc: Jeff Cody jc...@redhat.com
---
block/backup.c | 13 +
blockjob.c | 10 ++
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
---
block.c | 33 -
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index
Block replication is a very important feature which is used for
continuous checkpoints(for example: COLO).
Usage:
Please refer to docs/block-replication.txt
You can get the patch here:
https://github.com/wencongyang/qemu-colo/commits/block-replication-v5
The other newest COLO patchse will be
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
---
docs/block-replication.txt | 179 +
1 file
Signed-off-by: Wen Congyang we...@cn.fujitsu.com
Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com
Signed-off-by: Gonglei arei.gong...@huawei.com
Cc: Luiz Capitulino lcapitul...@redhat.com
Cc: Michael Roth mdr...@linux.vnet.ibm.com
Reviewed-by: Paolo Bonzini pbonz...@redhat.com
---
Usage:
-drive file=xxx,id=Y, \
-drive
file=,id=X,backing_reference.drive_id=Y,backing_reference.hidden-disk.*
It will create such backing chain:
{virtio-blk dev 'Y'}
{virtio-blk dev 'X'}
|
On 05/09/2015 01:21 AM, Kevin Wolf wrote:
For bs-file, using references to existing BDSes has been possible for a
while already. This patch enables the same for bs-backing_hd.
1. We reference to an existing BDSes, and some disk uses this blk. Do
we allow this?
2. bs-backing_hd-blk can be not
Am 20.05.2015 um 13:23 hat Markus Armbruster geschrieben:
Kevin and Stefan asked me to take care of this part.
Signed-off-by: Markus Armbruster arm...@redhat.com
Thanks, applied to the block branch.
Kevin
On Fri 08 May 2015 07:21:35 PM CEST, Kevin Wolf wrote:
Besides standardising on a single interface for opening child nodes,
this simplifies the .bdrv_open() implementation of the quorum block
driver by using block layer functionality for handling BlockdevRefs.
Signed-off-by: Kevin Wolf
On Fri 08 May 2015 07:21:37 PM CEST, Kevin Wolf wrote:
Signed-off-by: Kevin Wolf kw...@redhat.com
Reviewed-by: Alberto Garcia be...@igalia.com
Berto
51 matches
Mail list logo