"Dr. David Alan Gilbert" writes:
> * Max Reitz (mre...@redhat.com) wrote:
>> On 08.10.2015 08:15, Markus Armbruster wrote:
>> > Max Reitz writes:
>> >
>> >> On 22.09.2015 09:44, Wen Congyang wrote:
>> >>> The new QMP command name is x-blockdev-child-add,
Max Reitz writes:
> On 08.10.2015 08:15, Markus Armbruster wrote:
>> Max Reitz writes:
>>
>>> On 22.09.2015 09:44, Wen Congyang wrote:
The new QMP command name is x-blockdev-child-add, and x-blockdev-child-del.
It justs for adding/removing
* Max Reitz (mre...@redhat.com) wrote:
> On 09.10.2015 18:42, Dr. David Alan Gilbert wrote:
> > * Max Reitz (mre...@redhat.com) wrote:
> >> On 08.10.2015 08:15, Markus Armbruster wrote:
> >>> Max Reitz writes:
> >>>
> On 22.09.2015 09:44, Wen Congyang wrote:
> > The
One of the limitations of the 'blockdev-snapshot-sync' command is that
it does not allow passing BlockdevOptions to the newly created
snapshots, so they are always opened using the default values.
Extending the command to allow passing options is not a practical
solution because there is overlap
This series adds a new 'blockdev-snapshot' command, that is similar to
'blockdev-snapshot-sync' but takes references to two existing block
devices.
This depends on Max's "BlockBackend and media" series:
https://lists.gnu.org/archive/html/qemu-block/2015-09/msg00497.html
v7:
- Rebase on top of
To minimize code duplication, epoll is hooked into aio-posix's
aio_poll() instead of rolling its own. This approach also has the
advantage that both compile time and run time ability to switch from
between the two:
1) If configure script didn't find epoll, the libqemustub.a nop
functions will be
On 12/10/2015 11:55, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> Makefile.objs| 1 +
> aio-epoll.c | 150
> +++
> aio-posix.c | 16 -
> include/block/aio-internal.h | 15
The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows
setting the node name of the image that is going to be created.
Before creating the image, external_snapshot_prepare() checks that the
name is not already being used. The check is however incomplete since
it only considers
Am 09.10.2015 um 18:27 hat Fam Zheng geschrieben:
> On Fri, 10/09 16:31, Kevin Wolf wrote:
> > Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben:
> > > Signed-off-by: Fam Zheng
> > > ---
> > > aio-posix.c | 3 ++-
> > > aio-win32.c | 3 ++-
> > > async.c
Signed-off-by: Alberto Garcia
Reviewed-by: Max Reitz
---
tests/qemu-iotests/085 | 102 ++---
tests/qemu-iotests/085.out | 34 ++-
2 files changed, 128 insertions(+), 8 deletions(-)
diff --git
We will introduce the 'blockdev-snapshot' command that will require
its own struct for the parameters, so we need to rename this one in
order to avoid name clashes.
Signed-off-by: Alberto Garcia
Reviewed-by: Eric Blake
Reviewed-by: Max Reitz
Am 09.10.2015 um 20:24 hat Max Reitz geschrieben:
> On 09.10.2015 18:42, Dr. David Alan Gilbert wrote:
> > * Max Reitz (mre...@redhat.com) wrote:
> >> On 08.10.2015 08:15, Markus Armbruster wrote:
> >>> Max Reitz writes:
> >>>
> On 22.09.2015 09:44, Wen Congyang wrote:
>
This series adds the ability to use epoll in aio_poll() on Linux. It's switched
on in a dynamic way rather than static for two reasons: 1) when the number of
fds is not high enough, using epoll has little advantage; 2) when an epoll
incompatible fd needs to be handled, we need to fall back. The
This is the place to initialize platform specific bits of AioContext.
Signed-off-by: Fam Zheng
---
aio-posix.c | 4
aio-win32.c | 4
async.c | 14 --
include/block/aio-internal.h | 2 ++
4 files
AioHandler for win32 is a superset of the counterpart in aio-posix, move that
to a new header "aio-internal.h" and drop the posix variation.
Signed-off-by: Fam Zheng
---
aio-posix.c | 11 +--
aio-win32.c | 12 +---
On Fri, Sep 25, 2015 at 02:17:36PM +0800, Wen Congyang wrote:
> +/* start backup job now */
> +bdrv_op_unblock(s->hidden_disk, BLOCK_OP_TYPE_BACKUP_TARGET,
> +s->active_disk->backing_blocker);
> +bdrv_op_unblock(s->secondary_disk,
On Fri, Sep 25, 2015 at 02:17:36PM +0800, Wen Congyang wrote:
> +static void backup_job_completed(void *opaque, int ret)
> +{
> +BDRVReplicationState *s = opaque;
> +
> +if (s->replication_state != BLOCK_REPLICATION_DONE) {
> +/* The backup job is cancelled unexpectedly */
> +
On Fri, Sep 25, 2015 at 02:17:36PM +0800, Wen Congyang wrote:
> +static void replication_start(BlockDriverState *bs, ReplicationMode mode,
> + Error **errp)
> +{
> +BDRVReplicationState *s = bs->opaque;
> +int64_t active_length, hidden_length, disk_length;
> +
All callers pass in false, and the real external ones will switch to
true in coming patches.
Signed-off-by: Fam Zheng
---
aio-posix.c | 6 -
aio-win32.c | 5
async.c | 3 ++-
block/curl.c
v2: Use "bool" for external/internal instead of bit mask in the interface, so I
didn't pick up Kevin's rev-by due to patches change.
Add a unit test in tests/test-aio.c.
External I/O requests mustn't come in while we're in the middle of a
QMP transaction. This series adds
So we could distinguish it from internal used fds, thus avoid handling
unwanted events in nested aio polls.
Signed-off-by: Fam Zheng
---
nbd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nbd.c b/nbd.c
index 32a1f66..b599e62 100644
--- a/nbd.c
+++
On Fri 09 Oct 2015 05:51:55 PM CEST, Max Reitz wrote:
+s->bs = g_renew(BlockDriverState *, s->bs, s->max_children + 1);
+s->bs[s->num_children] = NULL;
+s->max_children++;
+}
>>>
>>> Just a suggestion, please feel free to ignore
Signed-off-by: Peter Lieven
---
hw/ide/atapi.c | 4 ++--
hw/ide/core.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index e0cf066..8d38b1d 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -187,7 +187,7 @@ static int
On Mon, 10/12 10:31, Kevin Wolf wrote:
> Am 09.10.2015 um 18:27 hat Fam Zheng geschrieben:
> > On Fri, 10/09 16:31, Kevin Wolf wrote:
> > > Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben:
> > > > Signed-off-by: Fam Zheng
> > > > ---
> > > > aio-posix.c | 3 ++-
> > > >
This ensures the atomicity of the transaction by avoiding processing of
external requests such as those from ioeventfd.
Move the assignment to state->bs up right after bdrv_drained_begin, so
that we can use it in the clean callback. The abort callback will still
check bs->job and state->job, so
This ensures the atomicity of the transaction by avoiding processing of
external requests such as those from ioeventfd.
Signed-off-by: Fam Zheng
---
blockdev.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index
On Mon, 10/12 12:06, Paolo Bonzini wrote:
>
>
> On 12/10/2015 11:55, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng
> > ---
> > Makefile.objs| 1 +
> > aio-epoll.c | 150
> > +++
> > aio-posix.c
They will be excluded by type in the nested event loops in block layer,
so that unwanted events won't be processed there.
Signed-off-by: Fam Zheng
---
hw/block/dataplane/virtio-blk.c | 5 ++---
hw/scsi/virtio-scsi-dataplane.c | 18 --
2 files changed, 10
PIO read requests on the ATAPI interface used to be sync blk requests.
This has two significant drawbacks. First the main loop hangs util an
I/O request is completed and secondly if the I/O request does not
complete (e.g. due to an unresponsive storage) Qemu hangs completely.
Signed-off-by: Peter
Signed-off-by: Peter Lieven
---
hw/ide/atapi.c | 4
1 file changed, 4 insertions(+)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 2271ea2..e0cf066 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -429,6 +429,10 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque,
Similar to the previous patch, make sure that external events are not
dispatched during transaction operations.
Signed-off-by: Fam Zheng
---
blockdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index 232bc21..015afbf 100644
The semantics is that after bdrv_drained_begin(bs), bs will not get new external
requests until the matching bdrv_drained_end(bs).
Signed-off-by: Fam Zheng
---
block.c | 2 ++
block/io.c| 18 ++
include/block/block.h | 19
On Fri 09 Oct 2015 02:15:32 PM CEST, Kevin Wolf wrote:
> 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
Am 12.10.2015 um 13:50 hat Fam Zheng geschrieben:
> The "need_check_timer" is used to clear the "NEED_CHECK" flag in the
> image header after a grace period once metadata update has finished. In
> compliance to the bdrv_drain semantics we should make sure it remains
> deleted once .bdrv_drain is
On Fri 09 Oct 2015 02:15:34 PM CEST, 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
Am 12.10.2015 um 13:50 hat Fam Zheng geschrieben:
> The semantics is that after bdrv_drained_begin(bs), bs will not get new
> external
> requests until the matching bdrv_drained_end(bs).
>
> Signed-off-by: Fam Zheng
> ---
> block.c | 2 ++
> block/io.c
On Fri, Sep 25, 2015 at 02:17:30PM +0800, Wen Congyang wrote:
> Signed-off-by: Wen Congyang
> Signed-off-by: zhanghailiang
> Signed-off-by: Gonglei
> Reviewed-by: Jeff Cody
> ---
> block/backup.c
On 09.10.2015 14:15, Kevin Wolf wrote:
> 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
>
Ping -- any consensus on how we should implement the "do-or-die"
argument for transactions that start block jobs? :)
This patch may look a little hokey in how it boxes arguments, but I can
re-do it on top of Eric Blake's very official way of boxing arguments,
when the QAPI dust settles.
--js
On
On 09.10.2015 14:15, Kevin Wolf wrote:
> This simplifies the code somewhat, especially when dropping whole
> backing file subchains.
>
> The exception is the mirroring code that does adventurous things with
> bdrv_swap() and in order to keep it working, I had to duplicate most of
>
With the new automatically-recursive implementation of
bdrv_is_inserted() checking by default whether all the children of a BDS
are inserted, we can drop raw's own implementation.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
blk_bs() will not necessarily return a non-NULL value any more (unless
blk_is_available() is true or it can be assumed to otherwise, e.g.
because it is called immediately after a successful blk_new_with_bs() or
blk_new_open()).
Signed-off-by: Max Reitz
---
block.c
Only call bdrv_add_key() on the BlockDriverState if it is not NULL.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
hw/usb/dev-storage.c | 30
There are several BlockBackend functions which, in theory, cannot fail.
This patch makes them cope with the BlockDriverState pointer being NULL
by making them fall back to some default action like ignoring the value
in setters and returning the default in getters.
Signed-off-by: Max Reitz
This structure will store some of the state of the root BDS if the BDS
tree is removed, so that state can be restored once a new BDS tree is
inserted.
Signed-off-by: Max Reitz
---
block/block-backend.c | 40
This function associates the given BlockDriverState with the given
BlockBackend.
Signed-off-by: Max Reitz
---
block/block-backend.c | 11 +++
include/sysemu/block-backend.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/block/block-backend.c
blk_dev_change_media_cb() is called for all potential tray movements;
however, it is possible to request closing the tray but nothing actually
happening (on a floppy disk drive without a medium).
Thus, the actual tray status should be inquired before sending a
tray-moved event (and an event
Signed-off-by: Max Reitz
---
blockdev.c | 23 +++
qapi/block-core.json | 16
qmp-commands.hx | 35 +++
3 files changed, 74 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index
Implement 'eject' by calling blockdev-open-tray and
blockdev-remove-medium.
Signed-off-by: Max Reitz
---
blockdev.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 706e7e1..ff3b353 100644
--- a/blockdev.c
+++
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.
Signed-off-by: Max Reitz
Reviewed-by: Alberto Garcia
Add an option to qmp_blockdev_change_medium() which allows changing the
read-only status of the block device whose medium is changed.
Some drives do not have a inherently fixed read-only status; for
instance, floppy disks can be set read-only or writable independently of
the drive. Some users may
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
hmp-commands.hx | 20 +---
hmp.c | 22 +-
2 files changed, 38
Signed-off-by: Max Reitz
---
blockdev.c | 49 +
qapi/block-core.json | 23 +++
qmp-commands.hx | 39 +++
3 files changed, 111 insertions(+)
diff --git
On 12.10.2015 11:16, Alberto Garcia wrote:
> The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows
> setting the node name of the image that is going to be created.
>
> Before creating the image, external_snapshot_prepare() checks that the
> name is not already being used. The check
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/118 | 638 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 644 insertions(+)
create mode
On 12.10.2015 11:16, Alberto Garcia wrote:
> One of the limitations of the 'blockdev-snapshot-sync' command is that
> it does not allow passing BlockdevOptions to the newly created
> snapshots, so they are always opened using the default values.
>
> Extending the command to allow passing options
Tests 071 and 081 test giving references in blockdev-add. It is not
necessary to create a BlockBackend here, so omit it.
While at it, fix up some blockdev-add invocations in the vicinity
(s/raw/$IMGFMT/ in 081, drop the format BDS for blkverify's raw child in
071).
Signed-off-by: Max Reitz
If the "id" field is missing from the options given to blockdev-add,
just omit the BlockBackend and create the BlockDriverState tree alone.
However, if "id" is missing, "node-name" must be specified; otherwise,
the BDS tree would no longer be accessible.
Many BDS options which are not parsed by
Make bdrv_is_inserted(), blk_is_inserted(), and the callback
BlockDriver.bdrv_is_inserted() return a bool.
Suggested-by: Eric Blake
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
guest_block_size is a guest device property so it should be moved into
the interface between block layer and guest devices, which is the
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Do not use "rudimentary" BDSs for empty drives any longer (for
freshly created drives).
After a follow-up patch, empty drives will generally use a NULL BDS, not
only the freshly created drives.
Signed-off-by: Max Reitz
---
blockdev.c | 72
Introduce a new QMP command 'blockdev-change-medium' which is intended
to replace the 'change' command for block devices. The existing function
qmp_change_blockdev() is accordingly renamed to
qmp_blockdev_change_medium().
Signed-off-by: Max Reitz
---
blockdev.c
Multiple sub-systems in QEMU may find it useful to generate IDs
for objects that a user may reference via QMP or HMP. This patch
presents a standardized way to do it, so that automatic ID generation
follows the same rules.
This patch enforces the following rules when generating an ID:
1.)
If a node-name is not specified, automatically generate the node-name.
Generated node-names will use the "block" sub-system identifier.
Reviewed-by: Eric Blake
Reviewed-by: John Snow
Signed-off-by: Jeff Cody
---
block.c | 19
Changes from v2:
Patch 1: Fixed prototype for id_generate() (thanks Alberto)
Used *const instead of * const (thanks Eric, Markus)
Updated function comment (thanks Markus)
Made random in range 0-99 instead of 0-98 (thanks, Marksu)
Patch 2:
Signed-off-by: Jeff Cody
---
tests/qemu-iotests/common.filter | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index d6d05de..cfdb633 100644
--- a/tests/qemu-iotests/common.filter
+++
On Fri, Oct 09, 2015 at 02:15:31PM +0200, Kevin Wolf wrote:
> It is unused now.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
> ---
> block.c
On Fri, Oct 09, 2015 at 02:15:30PM +0200, Kevin Wolf wrote:
> This patch removes the temporary duplication between bs->file and
> bs->file_child by converting everything to BdrvChild.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by:
On Fri, Oct 09, 2015 at 02:15:32PM +0200, Kevin Wolf wrote:
> 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
Signed-off-by: Jeff Cody
---
tests/qemu-iotests/041 | 4 ++--
tests/qemu-iotests/051 | 3 ++-
tests/qemu-iotests/051.out | 2 +-
tests/qemu-iotests/067 | 3 ++-
tests/qemu-iotests/067.out | 5 +
tests/qemu-iotests/081 | 3 ++-
tests/qemu-iotests/081.out | 2
On Mon 12 Oct 2015 10:29:35 PM CEST, Max Reitz wrote:
>> -if (has_snapshot_node_name &&
>> -bdrv_lookup_bs(snapshot_node_name, snapshot_node_name, NULL)) {
>> -error_setg(errp, "New snapshot node name already in use");
>
> There's a difference from v6
71 matches
Mail list logo