* [Qemu-devel] [PULL 00/19] Block patches
@ 2010-06-15 14:19 Kevin Wolf
2010-06-15 14:26 ` Anthony Liguori
0 siblings, 1 reply; 36+ messages in thread
From: Kevin Wolf @ 2010-06-15 14:19 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit fd42deeb4cb42f90084046e3ebdb4383953195e3:
Gerd Hoffmann (1):
Add exit notifiers.
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Blue Swirl (1):
block: fix a warning and possible truncation
Christoph Hellwig (3):
cow: use pread/pwrite
cow: stop using mmap
cow: use qemu block API
Jan Kiszka (1):
xen: Fix build error due to missing include
Jes Sorensen (1):
Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE
Kevin Wolf (5):
vpc: Read/write multiple sectors at once
qcow2: Allow get_refcount to return errors
qcow2: Allow alloc_clusters_noref to return errors
qcow2: Return real error code in load_refcount_block
qcow2: Restore L1 entry on l2_allocate failure
Markus Armbruster (7):
Fix regression for "-drive file="
block: Move error actions from DriveInfo to BlockDriverState
block: Decouple block device "commit all" from DriveInfo
monitor: Make "commit FOO" complain when FOO doesn't exist
block: New bdrv_next()
block: Decouple savevm from DriveInfo
blockdev: Give drives internal linkage
Miguel Di Ciurcio Filho (1):
savevm: Really verify if a drive supports snapshots
block.c | 49 ++++++++++++++++++-
block.h | 11 ++++
block/cow.c | 127 ++++++++++++++++++++++++++----------------------
block/qcow2-cluster.c | 1 +
block/qcow2-refcount.c | 70 +++++++++++++++++++++++----
block/vpc.c | 41 +++++++++++----
block_int.h | 1 +
blockdev.c | 39 +++++---------
blockdev.h | 12 -----
hw/fdc.c | 4 +-
hw/ide/core.c | 2 +-
hw/scsi-disk.c | 2 +-
hw/virtio-blk.c | 3 +-
hw/xen_backend.h | 1 +
qemu-char.c | 7 +--
qemu-common.h | 3 -
qemu-malloc.c | 5 --
savevm.c | 90 +++++++++++++++++++---------------
18 files changed, 291 insertions(+), 177 deletions(-)
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2010-06-15 14:19 Kevin Wolf
@ 2010-06-15 14:26 ` Anthony Liguori
0 siblings, 0 replies; 36+ messages in thread
From: Anthony Liguori @ 2010-06-15 14:26 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On 06/15/2010 09:19 AM, Kevin Wolf wrote:
> The following changes since commit fd42deeb4cb42f90084046e3ebdb4383953195e3:
> Gerd Hoffmann (1):
> Add exit notifiers.
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git for-anthony
>
Merged. Thanks.
Regards,
Anthony Liguori
> Blue Swirl (1):
> block: fix a warning and possible truncation
>
> Christoph Hellwig (3):
> cow: use pread/pwrite
> cow: stop using mmap
> cow: use qemu block API
>
> Jan Kiszka (1):
> xen: Fix build error due to missing include
>
> Jes Sorensen (1):
> Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE
>
> Kevin Wolf (5):
> vpc: Read/write multiple sectors at once
> qcow2: Allow get_refcount to return errors
> qcow2: Allow alloc_clusters_noref to return errors
> qcow2: Return real error code in load_refcount_block
> qcow2: Restore L1 entry on l2_allocate failure
>
> Markus Armbruster (7):
> Fix regression for "-drive file="
> block: Move error actions from DriveInfo to BlockDriverState
> block: Decouple block device "commit all" from DriveInfo
> monitor: Make "commit FOO" complain when FOO doesn't exist
> block: New bdrv_next()
> block: Decouple savevm from DriveInfo
> blockdev: Give drives internal linkage
>
> Miguel Di Ciurcio Filho (1):
> savevm: Really verify if a drive supports snapshots
>
> block.c | 49 ++++++++++++++++++-
> block.h | 11 ++++
> block/cow.c | 127 ++++++++++++++++++++++++++----------------------
> block/qcow2-cluster.c | 1 +
> block/qcow2-refcount.c | 70 +++++++++++++++++++++++----
> block/vpc.c | 41 +++++++++++----
> block_int.h | 1 +
> blockdev.c | 39 +++++---------
> blockdev.h | 12 -----
> hw/fdc.c | 4 +-
> hw/ide/core.c | 2 +-
> hw/scsi-disk.c | 2 +-
> hw/virtio-blk.c | 3 +-
> hw/xen_backend.h | 1 +
> qemu-char.c | 7 +--
> qemu-common.h | 3 -
> qemu-malloc.c | 5 --
> savevm.c | 90 +++++++++++++++++++---------------
> 18 files changed, 291 insertions(+), 177 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2011-10-21 17:18 Kevin Wolf
2011-10-24 16:19 ` Anthony Liguori
0 siblings, 1 reply; 36+ messages in thread
From: Kevin Wolf @ 2011-10-21 17:18 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit c2e2343e1faae7bbc77574c12a25881b1b696808:
hw/arm_gic.c: Fix save/load of irq_target array (2011-10-21 17:19:56 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Alex Jia (1):
fix memory leak in aio_write_f
Kevin Wolf (5):
xen_disk: Always set feature-barrier = 1
fdc: Fix floppy port I/O
qemu-img: Don't allow preallocation and compression at the same time
qcow2: Fix bdrv_write_compressed error handling
pc: Fix floppy drives with if=none
Paolo Bonzini (12):
sheepdog: add coroutine_fn markers
add socket_set_block
block: rename bdrv_co_rw_bh
block: unify flush implementations
block: add bdrv_co_discard and bdrv_aio_discard support
vmdk: fix return values of vmdk_parent_open
vmdk: clean up open
block: add a CoMutex to synchronous read drivers
block: take lock around bdrv_read implementations
block: take lock around bdrv_write implementations
block: change flush to co_flush
block: change discard to co_discard
Stefan Hajnoczi (1):
block: drop redundant bdrv_flush implementation
block.c | 258 ++++++++++++++++++++++++++++++-------------------
block.h | 5 +
block/blkdebug.c | 6 -
block/blkverify.c | 9 --
block/bochs.c | 15 +++-
block/cloop.c | 15 +++-
block/cow.c | 34 ++++++-
block/dmg.c | 15 +++-
block/nbd.c | 28 +++++-
block/parallels.c | 15 +++-
block/qcow.c | 17 +---
block/qcow2-cluster.c | 6 +-
block/qcow2.c | 72 ++++++--------
block/qed.c | 6 -
block/raw-posix.c | 23 +----
block/raw-win32.c | 4 +-
block/raw.c | 23 ++---
block/rbd.c | 4 +-
block/sheepdog.c | 14 ++--
block/vdi.c | 6 +-
block/vmdk.c | 82 ++++++++++------
block/vpc.c | 34 ++++++-
block/vvfat.c | 28 +++++-
block_int.h | 9 +-
hw/fdc.c | 14 +++
hw/fdc.h | 9 ++-
hw/pc.c | 25 +++--
hw/pc.h | 3 +-
hw/pc_piix.c | 5 +-
hw/xen_disk.c | 5 +-
oslib-posix.c | 7 ++
oslib-win32.c | 6 +
qemu-img.c | 11 ++
qemu-io.c | 1 +
qemu_socket.h | 1 +
trace-events | 1 +
36 files changed, 524 insertions(+), 292 deletions(-)
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2011-10-21 17:18 Kevin Wolf
@ 2011-10-24 16:19 ` Anthony Liguori
0 siblings, 0 replies; 36+ messages in thread
From: Anthony Liguori @ 2011-10-24 16:19 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On 10/21/2011 12:18 PM, Kevin Wolf wrote:
> The following changes since commit c2e2343e1faae7bbc77574c12a25881b1b696808:
>
> hw/arm_gic.c: Fix save/load of irq_target array (2011-10-21 17:19:56 +0200)
>
> are available in the git repository at:
> git://repo.or.cz/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Alex Jia (1):
> fix memory leak in aio_write_f
>
> Kevin Wolf (5):
> xen_disk: Always set feature-barrier = 1
> fdc: Fix floppy port I/O
> qemu-img: Don't allow preallocation and compression at the same time
> qcow2: Fix bdrv_write_compressed error handling
> pc: Fix floppy drives with if=none
>
> Paolo Bonzini (12):
> sheepdog: add coroutine_fn markers
> add socket_set_block
> block: rename bdrv_co_rw_bh
> block: unify flush implementations
> block: add bdrv_co_discard and bdrv_aio_discard support
> vmdk: fix return values of vmdk_parent_open
> vmdk: clean up open
> block: add a CoMutex to synchronous read drivers
> block: take lock around bdrv_read implementations
> block: take lock around bdrv_write implementations
> block: change flush to co_flush
> block: change discard to co_discard
>
> Stefan Hajnoczi (1):
> block: drop redundant bdrv_flush implementation
>
> block.c | 258 ++++++++++++++++++++++++++++++-------------------
> block.h | 5 +
> block/blkdebug.c | 6 -
> block/blkverify.c | 9 --
> block/bochs.c | 15 +++-
> block/cloop.c | 15 +++-
> block/cow.c | 34 ++++++-
> block/dmg.c | 15 +++-
> block/nbd.c | 28 +++++-
> block/parallels.c | 15 +++-
> block/qcow.c | 17 +---
> block/qcow2-cluster.c | 6 +-
> block/qcow2.c | 72 ++++++--------
> block/qed.c | 6 -
> block/raw-posix.c | 23 +----
> block/raw-win32.c | 4 +-
> block/raw.c | 23 ++---
> block/rbd.c | 4 +-
> block/sheepdog.c | 14 ++--
> block/vdi.c | 6 +-
> block/vmdk.c | 82 ++++++++++------
> block/vpc.c | 34 ++++++-
> block/vvfat.c | 28 +++++-
> block_int.h | 9 +-
> hw/fdc.c | 14 +++
> hw/fdc.h | 9 ++-
> hw/pc.c | 25 +++--
> hw/pc.h | 3 +-
> hw/pc_piix.c | 5 +-
> hw/xen_disk.c | 5 +-
> oslib-posix.c | 7 ++
> oslib-win32.c | 6 +
> qemu-img.c | 11 ++
> qemu-io.c | 1 +
> qemu_socket.h | 1 +
> trace-events | 1 +
> 36 files changed, 524 insertions(+), 292 deletions(-)
>
>
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2012-09-24 14:26 Kevin Wolf
2012-09-25 23:26 ` Anthony Liguori
0 siblings, 1 reply; 36+ messages in thread
From: Kevin Wolf @ 2012-09-24 14:26 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit d3e8f95753114a827f9cd8e819b1d5cc8333f76b:
w32: Add implementation of gmtime_r, localtime_r (2012-09-23 17:09:30 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Jeff Cody (18):
block: correctly set the keep_read_only flag
block: make bdrv_set_enable_write_cache() modify open_flags
block: Framework for reopening files safely
block: move aio initialization into a helper function
block: move open flag parsing in raw block drivers to helper functions
block: do not parse BDRV_O_CACHE_WB in block drivers
block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c
block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c
block: raw-posix image file reopen
block: raw image file reopen
block: qed image file reopen
block: qcow2 image file reopen
block: qcow image file reopen
block: vmdk image file reopen
block: vdi image file reopen
block: vpc image file reopen
block: convert bdrv_commit() to use bdrv_reopen()
block: remove keep_read_only flag from BlockDriverState struct
Kevin Shanahan (1):
blockdev: preserve readonly and snapshot states across media changes
block.c | 299 ++++++++++++++++++++++++++++++++++++++++++++---------
block.h | 18 +++
block/iscsi.c | 4 -
block/qcow.c | 10 ++
block/qcow2.c | 10 ++
block/qed.c | 9 ++
block/raw-posix.c | 225 ++++++++++++++++++++++++++++++----------
block/raw-win32.c | 40 ++++----
block/raw.c | 10 ++
block/rbd.c | 6 -
block/sheepdog.c | 14 +--
block/vdi.c | 7 ++
block/vmdk.c | 35 ++++++
block/vpc.c | 7 ++
block_int.h | 9 ++-
blockdev.c | 2 +
16 files changed, 563 insertions(+), 142 deletions(-)
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2012-09-24 14:26 Kevin Wolf
@ 2012-09-25 23:26 ` Anthony Liguori
0 siblings, 0 replies; 36+ messages in thread
From: Anthony Liguori @ 2012-09-25 23:26 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Kevin Wolf <kwolf@redhat.com> writes:
> The following changes since commit d3e8f95753114a827f9cd8e819b1d5cc8333f76b:
>
> w32: Add implementation of gmtime_r, localtime_r (2012-09-23 17:09:30 +0000)
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Jeff Cody (18):
> block: correctly set the keep_read_only flag
> block: make bdrv_set_enable_write_cache() modify open_flags
> block: Framework for reopening files safely
> block: move aio initialization into a helper function
> block: move open flag parsing in raw block drivers to helper functions
> block: do not parse BDRV_O_CACHE_WB in block drivers
> block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c
> block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c
> block: raw-posix image file reopen
> block: raw image file reopen
> block: qed image file reopen
> block: qcow2 image file reopen
> block: qcow image file reopen
> block: vmdk image file reopen
> block: vdi image file reopen
> block: vpc image file reopen
> block: convert bdrv_commit() to use bdrv_reopen()
> block: remove keep_read_only flag from BlockDriverState struct
>
> Kevin Shanahan (1):
> blockdev: preserve readonly and snapshot states across media changes
>
> block.c | 299 ++++++++++++++++++++++++++++++++++++++++++++---------
> block.h | 18 +++
> block/iscsi.c | 4 -
> block/qcow.c | 10 ++
> block/qcow2.c | 10 ++
> block/qed.c | 9 ++
> block/raw-posix.c | 225 ++++++++++++++++++++++++++++++----------
> block/raw-win32.c | 40 ++++----
> block/raw.c | 10 ++
> block/rbd.c | 6 -
> block/sheepdog.c | 14 +--
> block/vdi.c | 7 ++
> block/vmdk.c | 35 ++++++
> block/vpc.c | 7 ++
> block_int.h | 9 ++-
> blockdev.c | 2 +
> 16 files changed, 563 insertions(+), 142 deletions(-)
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2014-03-07 13:32 Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 01/19] gluster: Change licence to GPLv2+ Kevin Wolf
` (19 more replies)
0 siblings, 20 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
The following changes since commit f55ea6297cc0224fe4934b90ff5343b620b14669:
block/gluster: Add missing argument to qemu_gluster_init() call (2014-03-04 20:20:57 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 4089f7c6a0d91020ca60ce8300784c93dd9ddcbe:
block: qemu-iotests 085 - live snapshots tests (2014-03-07 11:36:12 +0100)
----------------------------------------------------------------
Block patches
----------------------------------------------------------------
Benoît Canet (1):
block: make bdrv_swap rebuild the bs graph node list field.
Bharata B Rao (2):
gluster: Change licence to GPLv2+
gluster: Remove unused defines and header include
Jeff Cody (2):
block: mirror - remove code cruft that has no function
block: qemu-iotests 085 - live snapshots tests
Kevin Wolf (8):
qemu-img convert: Fix progress output
qemu-iotests: Test progress output for conversion
iscsi: Use bs->sg for everything else than disks
block: Fix bs->request_alignment assertion for bs->sg=1
blockdev: Fail blockdev-add with encrypted images
blockdev: Fix NULL pointer dereference in blockdev-add
qemu-iotests: Test a few blockdev-add error cases
block: Fix error path segfault in bdrv_open()
Max Reitz (5):
block: Keep "filename" option after parsing
block/raw-posix: Implement bdrv_parse_filename()
block/raw-posix: Strip "file:" prefix on creation
block/raw-win32: Implement bdrv_parse_filename()
block/raw-win32: Strip "file:" prefix on creation
Peter Maydell (1):
hw/ide/ahci.h: Avoid shifting left into sign bit
block.c | 34 ++++++--
block/gluster.c | 16 +---
block/iscsi.c | 9 +--
block/mirror.c | 3 -
block/raw-posix.c | 14 ++++
block/raw-win32.c | 14 ++++
blockdev.c | 15 +++-
hw/ide/ahci.h | 10 +--
qemu-img.c | 20 ++---
tests/qemu-iotests/051 | 9 +++
tests/qemu-iotests/051.out | 15 ++++
tests/qemu-iotests/085 | 192 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/085.out | 55 +++++++++++++
tests/qemu-iotests/086 | 65 +++++++++++++++
tests/qemu-iotests/086.out | 18 +++++
tests/qemu-iotests/087 | 122 ++++++++++++++++++++++++++++
tests/qemu-iotests/087.out | 40 ++++++++++
tests/qemu-iotests/group | 3 +
18 files changed, 608 insertions(+), 46 deletions(-)
create mode 100755 tests/qemu-iotests/085
create mode 100644 tests/qemu-iotests/085.out
create mode 100755 tests/qemu-iotests/086
create mode 100644 tests/qemu-iotests/086.out
create mode 100755 tests/qemu-iotests/087
create mode 100644 tests/qemu-iotests/087.out
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 01/19] gluster: Change licence to GPLv2+
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 02/19] gluster: Remove unused defines and header include Kevin Wolf
` (18 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
Pipe handling mechanism in gluster driver was based on similar implementation
in RBD driver and hence had GPLv2 and associated copyright information.
After changing gluster driver to coroutine based implementation, the pipe
handling code no longer exists and hence change gluster driver's licence to
GPLv2+ and remove RBD copyrights.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/gluster.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/block/gluster.c b/block/gluster.c
index fe7a10c..8b6ae1c 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -3,17 +3,9 @@
*
* Copyright (C) 2012 Bharata B Rao <bharata@linux.vnet.ibm.com>
*
- * Pipe handling mechanism in AIO implementation is derived from
- * block/rbd.c. Hence,
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
*
- * Copyright (C) 2010-2011 Christian Brunner <chb@muc.de>,
- * Josh Durgin <josh.durgin@dreamhost.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2. See
- * the COPYING file in the top-level directory.
- *
- * Contributions after 2012-01-13 are licensed under the terms of the
- * GNU GPL, version 2 or (at your option) any later version.
*/
#include <glusterfs/api/glfs.h>
#include "block/block_int.h"
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 02/19] gluster: Remove unused defines and header include
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 01/19] gluster: Change licence to GPLv2+ Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 03/19] qemu-img convert: Fix progress output Kevin Wolf
` (17 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
Remove the definitions of GLUSTER_FD_WRITE and GLUSTER_FD_READ which are
no longer used. Also sockets.h isn't needed any more.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/gluster.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/gluster.c b/block/gluster.c
index 8b6ae1c..a44d612 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -9,7 +9,6 @@
*/
#include <glusterfs/api/glfs.h>
#include "block/block_int.h"
-#include "qemu/sockets.h"
#include "qemu/uri.h"
typedef struct GlusterAIOCB {
@@ -24,9 +23,6 @@ typedef struct BDRVGlusterState {
struct glfs_fd *fd;
} BDRVGlusterState;
-#define GLUSTER_FD_READ 0
-#define GLUSTER_FD_WRITE 1
-
typedef struct GlusterConf {
char *server;
int port;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 03/19] qemu-img convert: Fix progress output
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 01/19] gluster: Change licence to GPLv2+ Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 02/19] gluster: Remove unused defines and header include Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 04/19] qemu-iotests: Test progress output for conversion Kevin Wolf
` (16 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
Initialise progress output only when the -p and -q options have already
been parsed, otherwise it's always disabled.
Reported-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
qemu-img.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 886db88..2e40cc1 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1162,9 +1162,6 @@ static int img_convert(int argc, char **argv)
Error *local_err = NULL;
QemuOpts *sn_opts = NULL;
- /* Initialize before goto out */
- qemu_progress_init(progress, 1.0);
-
fmt = NULL;
out_fmt = "raw";
cache = "unsafe";
@@ -1197,17 +1194,17 @@ static int img_convert(int argc, char **argv)
error_report("option -e is deprecated, please use \'-o "
"encryption\' instead!");
ret = -1;
- goto out;
+ goto fail_getopt;
case '6':
error_report("option -6 is deprecated, please use \'-o "
"compat6\' instead!");
ret = -1;
- goto out;
+ goto fail_getopt;
case 'o':
if (!is_valid_option_list(optarg)) {
error_report("Invalid option list: %s", optarg);
ret = -1;
- goto out;
+ goto fail_getopt;
}
if (!options) {
options = g_strdup(optarg);
@@ -1227,7 +1224,7 @@ static int img_convert(int argc, char **argv)
error_report("Failed in parsing snapshot param '%s'",
optarg);
ret = -1;
- goto out;
+ goto fail_getopt;
}
} else {
snapshot_name = optarg;
@@ -1241,7 +1238,7 @@ static int img_convert(int argc, char **argv)
if (sval < 0 || *end) {
error_report("Invalid minimum zero buffer size for sparse output specified");
ret = -1;
- goto out;
+ goto fail_getopt;
}
min_sparse = sval / BDRV_SECTOR_SIZE;
@@ -1262,9 +1259,12 @@ static int img_convert(int argc, char **argv)
}
}
+ /* Initialize before goto out */
if (quiet) {
progress = 0;
}
+ qemu_progress_init(progress, 1.0);
+
bs_n = argc - optind - 1;
out_filename = bs_n >= 1 ? argv[argc - 1] : NULL;
@@ -1667,7 +1667,6 @@ out:
free_option_parameters(create_options);
free_option_parameters(param);
qemu_vfree(buf);
- g_free(options);
if (sn_opts) {
qemu_opts_del(sn_opts);
}
@@ -1682,6 +1681,9 @@ out:
}
g_free(bs);
}
+fail_getopt:
+ g_free(options);
+
if (ret) {
return 1;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 04/19] qemu-iotests: Test progress output for conversion
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (2 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 03/19] qemu-img convert: Fix progress output Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 05/19] iscsi: Use bs->sg for everything else than disks Kevin Wolf
` (15 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/086 | 65 ++++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/086.out | 18 +++++++++++++
tests/qemu-iotests/group | 1 +
3 files changed, 84 insertions(+)
create mode 100755 tests/qemu-iotests/086
create mode 100644 tests/qemu-iotests/086.out
diff --git a/tests/qemu-iotests/086 b/tests/qemu-iotests/086
new file mode 100755
index 0000000..48fe85b
--- /dev/null
+++ b/tests/qemu-iotests/086
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Test qemu-img progress output
+#
+# Copyright (C) 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# creator
+owner=kwolf@redhat.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+_cleanup()
+{
+ _cleanup_test_img
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt qcow2
+_supported_proto file
+_supported_os Linux
+
+function run_qemu_img()
+{
+ echo
+ echo Testing: "$@" | _filter_testdir
+}
+
+size=128M
+
+_make_test_img $size
+$QEMU_IO -c 'write 0 1M' $TEST_IMG | _filter_qemu_io
+$QEMU_IO -c 'write 2M 1M' $TEST_IMG | _filter_qemu_io
+$QEMU_IO -c 'write 4M 1M' $TEST_IMG | _filter_qemu_io
+$QEMU_IO -c 'write 32M 1M' $TEST_IMG | _filter_qemu_io
+
+$QEMU_IMG convert -p -O $IMGFMT -f $IMGFMT "$TEST_IMG" "$TEST_IMG".base 2>&1 |\
+ _filter_testdir | sed -e 's/\r/\n/g'
+
+# success, all done
+echo "*** done"
+rm -f $seq.full
+status=0
diff --git a/tests/qemu-iotests/086.out b/tests/qemu-iotests/086.out
new file mode 100644
index 0000000..9c0bf23
--- /dev/null
+++ b/tests/qemu-iotests/086.out
@@ -0,0 +1,18 @@
+QA output created by 086
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+wrote 1048576/1048576 bytes at offset 0
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 1048576/1048576 bytes at offset 2097152
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 1048576/1048576 bytes at offset 4194304
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 1048576/1048576 bytes at offset 33554432
+1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+ (0.00/100%)
+ (25.00/100%)
+ (50.00/100%)
+ (75.00/100%)
+ (100.00/100%)
+ (100.00/100%)
+
+*** done
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 8dd8553..901730d 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -85,3 +85,4 @@
079 rw auto
081 rw auto
082 rw auto quick
+086 rw auto quick
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 05/19] iscsi: Use bs->sg for everything else than disks
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (3 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 04/19] qemu-iotests: Test progress output for conversion Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 06/19] block: Fix bs->request_alignment assertion for bs->sg=1 Kevin Wolf
` (14 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
The current iscsi block driver code makes the rather arbitrary decision
that TYPE_MEDIUM_CHANGER and TYPE_TAPE devices have bs->sg = 1 and all
other device types are disks.
Instead of this, check for TYPE_DISK to expose the disk interface and
make everything else bs->sg = 1. In particular, this includes devices
with TYPE_STORAGE_ARRAY, which is what LUN 0 of an iscsi target is.
(See https://bugzilla.redhat.com/show_bug.cgi?id=1067784 for the exact
scenario.)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/iscsi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 0a15f53..b490e98 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1231,12 +1231,11 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun);
bs->request_alignment = iscsilun->block_size;
- /* Medium changer or tape. We dont have any emulation for this so this must
- * be sg ioctl compatible. We force it to be sg, otherwise qemu will try
- * to read from the device to guess the image format.
+ /* We don't have any emulation for devices other than disks and CD-ROMs, so
+ * this must be sg ioctl compatible. We force it to be sg, otherwise qemu
+ * will try to read from the device to guess the image format.
*/
- if (iscsilun->type == TYPE_MEDIUM_CHANGER ||
- iscsilun->type == TYPE_TAPE) {
+ if (iscsilun->type != TYPE_DISK && iscsilun->type != TYPE_ROM) {
bs->sg = 1;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 06/19] block: Fix bs->request_alignment assertion for bs->sg=1
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (4 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 05/19] iscsi: Use bs->sg for everything else than disks Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 07/19] block: make bdrv_swap rebuild the bs graph node list field Kevin Wolf
` (13 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
For sg backends, bs->request_alignment is meaningless and may be 0.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 38bbdf3..f01b91c 100644
--- a/block.c
+++ b/block.c
@@ -935,7 +935,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
bdrv_refresh_limits(bs);
assert(bdrv_opt_mem_align(bs) != 0);
- assert(bs->request_alignment != 0);
+ assert((bs->request_alignment != 0) || bs->sg);
#ifndef _WIN32
if (bs->is_temporary) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 07/19] block: make bdrv_swap rebuild the bs graph node list field.
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (5 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 06/19] block: Fix bs->request_alignment assertion for bs->sg=1 Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 08/19] block: mirror - remove code cruft that has no function Kevin Wolf
` (12 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Benoît Canet <benoit.canet@irqsave.net>
Moving only the node_name one field could lead to some inconsitencies where a
node_name was defined on a bs which was not registered in the graph node list.
bdrv_swap between a named node bs and a non named node bs would lead to this.
bdrv_make_anon would then crash because it would try to remove the bs from the
graph node list while it is not in it.
This patch remove named node bses from the graph node list before doing the swap
then insert them back.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/block.c b/block.c
index f01b91c..7330a87 100644
--- a/block.c
+++ b/block.c
@@ -1847,11 +1847,6 @@ static void bdrv_move_feature_fields(BlockDriverState *bs_dest,
pstrcpy(bs_dest->device_name, sizeof(bs_dest->device_name),
bs_src->device_name);
bs_dest->device_list = bs_src->device_list;
-
- /* keep the same entry in graph_bdrv_states
- * We do want to swap name but don't want to swap linked list entries
- */
- bs_dest->node_list = bs_src->node_list;
}
/*
@@ -1870,6 +1865,17 @@ void bdrv_swap(BlockDriverState *bs_new, BlockDriverState *bs_old)
{
BlockDriverState tmp;
+ /* The code needs to swap the node_name but simply swapping node_list won't
+ * work so first remove the nodes from the graph list, do the swap then
+ * insert them back if needed.
+ */
+ if (bs_new->node_name[0] != '\0') {
+ QTAILQ_REMOVE(&graph_bdrv_states, bs_new, node_list);
+ }
+ if (bs_old->node_name[0] != '\0') {
+ QTAILQ_REMOVE(&graph_bdrv_states, bs_old, node_list);
+ }
+
/* bs_new must be anonymous and shouldn't have anything fancy enabled */
assert(bs_new->device_name[0] == '\0');
assert(QLIST_EMPTY(&bs_new->dirty_bitmaps));
@@ -1898,6 +1904,14 @@ void bdrv_swap(BlockDriverState *bs_new, BlockDriverState *bs_old)
assert(bs_new->io_limits_enabled == false);
assert(!throttle_have_timer(&bs_new->throttle_state));
+ /* insert the nodes back into the graph node list if needed */
+ if (bs_new->node_name[0] != '\0') {
+ QTAILQ_INSERT_TAIL(&graph_bdrv_states, bs_new, node_list);
+ }
+ if (bs_old->node_name[0] != '\0') {
+ QTAILQ_INSERT_TAIL(&graph_bdrv_states, bs_old, node_list);
+ }
+
bdrv_rebind(bs_new);
bdrv_rebind(bs_old);
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 08/19] block: mirror - remove code cruft that has no function
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (6 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 07/19] block: make bdrv_swap rebuild the bs graph node list field Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 09/19] block: Keep "filename" option after parsing Kevin Wolf
` (11 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Jeff Cody <jcody@redhat.com>
Originally, this built up the error message with the backing filename,
so that errp was set as follows:
error_set(errp, QERR_OPEN_FILE_FAILED, backing_filename);
However, we now propagate the local_error from the
bdrv_open_backing_file() call instead, making these 2 lines useless
code.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/mirror.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index e683959..dd5ee05 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -520,9 +520,6 @@ static void mirror_complete(BlockJob *job, Error **errp)
ret = bdrv_open_backing_file(s->target, NULL, &local_err);
if (ret < 0) {
- char backing_filename[PATH_MAX];
- bdrv_get_full_backing_filename(s->target, backing_filename,
- sizeof(backing_filename));
error_propagate(errp, local_err);
return;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 09/19] block: Keep "filename" option after parsing
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (7 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 08/19] block: mirror - remove code cruft that has no function Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 10/19] block/raw-posix: Implement bdrv_parse_filename() Kevin Wolf
` (10 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Max Reitz <mreitz@redhat.com>
Currently, bdrv_file_open() always removes the "filename" option from
the options QDict after bdrv_parse_filename() has been (successfully)
called. However, for drivers with bdrv_needs_filename, it makes more
sense for bdrv_parse_filename() to overwrite the "filename" option and
for bdrv_file_open() to fetch the filename from there.
Since there currently are no drivers that implement
bdrv_parse_filename() and have bdrv_needs_filename set, this does not
change current behavior.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 7330a87..e7387f1 100644
--- a/block.c
+++ b/block.c
@@ -1017,7 +1017,12 @@ static int bdrv_file_open(BlockDriverState *bs, const char *filename,
ret = -EINVAL;
goto fail;
}
- qdict_del(*options, "filename");
+
+ if (!drv->bdrv_needs_filename) {
+ qdict_del(*options, "filename");
+ } else {
+ filename = qdict_get_str(*options, "filename");
+ }
}
if (!drv->bdrv_file_open) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 10/19] block/raw-posix: Implement bdrv_parse_filename()
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (8 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 09/19] block: Keep "filename" option after parsing Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 11/19] block/raw-posix: Strip "file:" prefix on creation Kevin Wolf
` (9 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Max Reitz <mreitz@redhat.com>
The "file" protocol driver should strip the "file:" prefix from
filenames if present.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/raw-posix.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 161ea14..892145c 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -336,6 +336,17 @@ error:
}
#endif
+static void raw_parse_filename(const char *filename, QDict *options,
+ Error **errp)
+{
+ /* The filename does not have to be prefixed by the protocol name, since
+ * "file" is the default protocol; therefore, the return value of this
+ * function call can be ignored. */
+ strstart(filename, "file:", &filename);
+
+ qdict_put_obj(options, "filename", QOBJECT(qstring_from_str(filename)));
+}
+
static QemuOptsList raw_runtime_opts = {
.name = "raw",
.head = QTAILQ_HEAD_INITIALIZER(raw_runtime_opts.head),
@@ -1412,6 +1423,7 @@ static BlockDriver bdrv_file = {
.instance_size = sizeof(BDRVRawState),
.bdrv_needs_filename = true,
.bdrv_probe = NULL, /* no probe for protocols */
+ .bdrv_parse_filename = raw_parse_filename,
.bdrv_file_open = raw_open,
.bdrv_reopen_prepare = raw_reopen_prepare,
.bdrv_reopen_commit = raw_reopen_commit,
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 11/19] block/raw-posix: Strip "file:" prefix on creation
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (9 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 10/19] block/raw-posix: Implement bdrv_parse_filename() Kevin Wolf
@ 2014-03-07 13:32 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 12/19] block/raw-win32: Implement bdrv_parse_filename() Kevin Wolf
` (8 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:32 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Max Reitz <mreitz@redhat.com>
The bdrv_create() implementation of the block/raw-posix "file" protocol
driver should strip the "file:" prefix from filenames if present.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/raw-posix.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 892145c..e6b4c1f 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1241,6 +1241,8 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
int result = 0;
int64_t total_size = 0;
+ strstart(filename, "file:", &filename);
+
/* Read out options */
while (options && options->name) {
if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 12/19] block/raw-win32: Implement bdrv_parse_filename()
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (10 preceding siblings ...)
2014-03-07 13:32 ` [Qemu-devel] [PULL 11/19] block/raw-posix: Strip "file:" prefix on creation Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creation Kevin Wolf
` (7 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Max Reitz <mreitz@redhat.com>
The "file" protocol driver should strip the "file:" prefix from
filenames if present.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/raw-win32.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/block/raw-win32.c b/block/raw-win32.c
index ae1c8e6..0755434 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -251,6 +251,17 @@ static void raw_parse_flags(int flags, int *access_flags, DWORD *overlapped)
}
}
+static void raw_parse_filename(const char *filename, QDict *options,
+ Error **errp)
+{
+ /* The filename does not have to be prefixed by the protocol name, since
+ * "file" is the default protocol; therefore, the return value of this
+ * function call can be ignored. */
+ strstart(filename, "file:", &filename);
+
+ qdict_put_obj(options, "filename", QOBJECT(qstring_from_str(filename)));
+}
+
static QemuOptsList raw_runtime_opts = {
.name = "raw",
.head = QTAILQ_HEAD_INITIALIZER(raw_runtime_opts.head),
@@ -504,6 +515,7 @@ static BlockDriver bdrv_file = {
.protocol_name = "file",
.instance_size = sizeof(BDRVRawState),
.bdrv_needs_filename = true,
+ .bdrv_parse_filename = raw_parse_filename,
.bdrv_file_open = raw_open,
.bdrv_close = raw_close,
.bdrv_create = raw_create,
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creation
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (11 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 12/19] block/raw-win32: Implement bdrv_parse_filename() Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 14/19] blockdev: Fail blockdev-add with encrypted images Kevin Wolf
` (6 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Max Reitz <mreitz@redhat.com>
The bdrv_create() implementation of the block/raw-win32 "file" protocol
driver should strip the "file:" prefix from filenames if present.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/raw-win32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 0755434..9954748 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -481,6 +481,8 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
int fd;
int64_t total_size = 0;
+ strstart(filename, "file:", &filename);
+
/* Read out options */
while (options && options->name) {
if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 14/19] blockdev: Fail blockdev-add with encrypted images
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (12 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creation Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 15/19] blockdev: Fix NULL pointer dereference in blockdev-add Kevin Wolf
` (5 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
Encrypted images need a password before they can be used, and we don't
want blockdev-add to create BDSes that aren't fully initialised. So for
now simply forbid encrypted images; we can come back to it later if we
need the functionality.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
blockdev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index 357f760..561cb81 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2266,6 +2266,7 @@ void qmp_block_job_complete(const char *device, Error **errp)
void qmp_blockdev_add(BlockdevOptions *options, Error **errp)
{
QmpOutputVisitor *ov = qmp_output_visitor_new();
+ DriveInfo *dinfo;
QObject *obj;
QDict *qdict;
Error *local_err = NULL;
@@ -2301,12 +2302,18 @@ void qmp_blockdev_add(BlockdevOptions *options, Error **errp)
qdict_flatten(qdict);
- blockdev_init(NULL, qdict, &local_err);
+ dinfo = blockdev_init(NULL, qdict, &local_err);
if (local_err) {
error_propagate(errp, local_err);
goto fail;
}
+ if (bdrv_key_required(dinfo->bdrv)) {
+ drive_uninit(dinfo);
+ error_setg(errp, "blockdev-add doesn't support encrypted devices");
+ goto fail;
+ }
+
fail:
qmp_output_visitor_cleanup(ov);
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 15/19] blockdev: Fix NULL pointer dereference in blockdev-add
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (13 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 14/19] blockdev: Fail blockdev-add with encrypted images Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 16/19] qemu-iotests: Test a few blockdev-add error cases Kevin Wolf
` (4 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
If aio=native, we check that cache.direct is set as well. If however
cache wasn't specified at all, qemu just segfaulted.
The old condition didn't make any sense anyway because it effectively
only checked for the default cache mode case, but not for an explicitly
set cache.direct=off mode.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
blockdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 561cb81..c3422a1 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2283,8 +2283,10 @@ void qmp_blockdev_add(BlockdevOptions *options, Error **errp)
*
* For now, simply forbidding the combination for all drivers will do. */
if (options->has_aio && options->aio == BLOCKDEV_AIO_OPTIONS_NATIVE) {
- bool direct = options->cache->has_direct && options->cache->direct;
- if (!options->has_cache && !direct) {
+ bool direct = options->has_cache &&
+ options->cache->has_direct &&
+ options->cache->direct;
+ if (!direct) {
error_setg(errp, "aio=native requires cache.direct=true");
goto fail;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 16/19] qemu-iotests: Test a few blockdev-add error cases
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (14 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 15/19] blockdev: Fix NULL pointer dereference in blockdev-add Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 17/19] block: Fix error path segfault in bdrv_open() Kevin Wolf
` (3 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
---
tests/qemu-iotests/087 | 122 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/087.out | 40 +++++++++++++++
tests/qemu-iotests/group | 1 +
3 files changed, 163 insertions(+)
create mode 100755 tests/qemu-iotests/087
create mode 100644 tests/qemu-iotests/087.out
diff --git a/tests/qemu-iotests/087 b/tests/qemu-iotests/087
new file mode 100755
index 0000000..53b6c43
--- /dev/null
+++ b/tests/qemu-iotests/087
@@ -0,0 +1,122 @@
+#!/bin/bash
+#
+# Test unsupported blockdev-add cases
+#
+# Copyright (C) 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# creator
+owner=kwolf@redhat.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt qcow2
+_supported_proto file
+_supported_os Linux
+
+function do_run_qemu()
+{
+ echo Testing: "$@"
+ $QEMU -nographic -qmp stdio -serial none "$@"
+ echo
+}
+
+function run_qemu()
+{
+ do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qmp | sed -e 's/\("actual-size":\s*\)[0-9]\+/\1SIZE/g'
+}
+
+size=128M
+
+_make_test_img $size
+
+echo
+echo === Missing ID ===
+echo
+
+run_qemu <<EOF
+{ "execute": "qmp_capabilities" }
+{ "execute": "blockdev-add",
+ "arguments": {
+ "options": {
+ "driver": "$IMGFMT",
+ "file": {
+ "driver": "file",
+ "filename": "$TEST_IMG"
+ }
+ }
+ }
+ }
+{ "execute": "quit" }
+EOF
+
+echo
+echo === aio=native without O_DIRECT ===
+echo
+
+run_qemu <<EOF
+{ "execute": "qmp_capabilities" }
+{ "execute": "blockdev-add",
+ "arguments": {
+ "options": {
+ "driver": "$IMGFMT",
+ "id": "disk",
+ "aio": "native",
+ "file": {
+ "driver": "file",
+ "filename": "$TEST_IMG"
+ }
+ }
+ }
+ }
+{ "execute": "quit" }
+EOF
+
+echo
+echo === Encrypted image ===
+echo
+
+_make_test_img -o encryption=on $size
+run_qemu <<EOF
+{ "execute": "qmp_capabilities" }
+{ "execute": "blockdev-add",
+ "arguments": {
+ "options": {
+ "driver": "$IMGFMT",
+ "id": "disk",
+ "file": {
+ "driver": "file",
+ "filename": "$TEST_IMG"
+ }
+ }
+ }
+ }
+{ "execute": "quit" }
+EOF
+
+# success, all done
+echo "*** done"
+rm -f $seq.full
+status=0
diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out
new file mode 100644
index 0000000..b871032
--- /dev/null
+++ b/tests/qemu-iotests/087.out
@@ -0,0 +1,40 @@
+QA output created by 087
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+
+=== Missing ID ===
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "Block device needs an ID"}}
+{"return": {}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}}
+
+
+=== aio=native without O_DIRECT ===
+
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "aio=native requires cache.direct=true"}}
+{"return": {}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}}
+
+
+=== Encrypted image ===
+
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
+Testing:
+QMP_VERSION
+{"return": {}}
+{"error": {"class": "GenericError", "desc": "blockdev-add doesn't support encrypted devices"}}
+{"return": {}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "floppy0", "tray-open": true}}
+
+*** done
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 901730d..9ec62d2 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -86,3 +86,4 @@
081 rw auto
082 rw auto quick
086 rw auto quick
+087 rw auto quick
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 17/19] block: Fix error path segfault in bdrv_open()
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (15 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 16/19] qemu-iotests: Test a few blockdev-add error cases Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 18/19] hw/ide/ahci.h: Avoid shifting left into sign bit Kevin Wolf
` (2 subsequent siblings)
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
Using an invalid option for a block device that is opened with
BDRV_O_PROTOCOL led to drv = NULL, and when trying to include the driver
name in the error message, qemu dereferenced it:
$ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
Segmentation fault (core dumped)
With this patch applied, the expected error message is printed:
$ x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/test.qcow2,file.foo=bar
qemu-system-x86_64: -drive file=/tmp/test.qcow2,file.foo=bar: could
not open disk image /tmp/test.qcow2: Block protocol 'file' doesn't
support the option 'foo'
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
---
block.c | 1 +
tests/qemu-iotests/051 | 9 +++++++++
tests/qemu-iotests/051.out | 15 +++++++++++++++
3 files changed, 25 insertions(+)
diff --git a/block.c b/block.c
index e7387f1..f1ef4b0 100644
--- a/block.c
+++ b/block.c
@@ -1234,6 +1234,7 @@ int bdrv_open(BlockDriverState **pbs, const char *filename,
ret = bdrv_file_open(bs, filename, &options, flags & ~BDRV_O_PROTOCOL,
&local_err);
if (!ret) {
+ drv = bs->drv;
goto done;
} else if (bs->drv) {
goto close_and_fail;
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 46345fb..14694e1 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -78,6 +78,15 @@ run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=1234
run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=foo
echo
+echo === Unknown protocol option ===
+echo
+
+run_qemu -drive file="$TEST_IMG",format=qcow2,file.unknown_opt=
+run_qemu -drive file="$TEST_IMG",format=qcow2,file.unknown_opt=on
+run_qemu -drive file="$TEST_IMG",format=qcow2,file.unknown_opt=1234
+run_qemu -drive file="$TEST_IMG",format=qcow2,file.unknown_opt=foo
+
+echo
echo === Invalid format ===
echo
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index 7de1870..f5e33ff 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -17,6 +17,21 @@ Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
+=== Unknown protocol option ===
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: could not open disk image TEST_DIR/t.qcow2: Block protocol 'file' doesn't support the option 'unknown_opt'
+
+
=== Invalid format ===
Testing: -drive file=TEST_DIR/t.qcow2,format=foo
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 18/19] hw/ide/ahci.h: Avoid shifting left into sign bit
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (16 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 17/19] block: Fix error path segfault in bdrv_open() Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 19/19] block: qemu-iotests 085 - live snapshots tests Kevin Wolf
2014-03-08 12:40 ` [Qemu-devel] [PULL 00/19] Block patches Peter Maydell
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Peter Maydell <peter.maydell@linaro.org>
Add 'U' suffixes to avoid undefined behaviour shifting left into
the signed bit of a signed integer type. Clang's sanitizer will
warn about this:
hw/ide/ahci.c:1210:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/ahci.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
index 20e412c..9a4064f 100644
--- a/hw/ide/ahci.h
+++ b/hw/ide/ahci.h
@@ -40,7 +40,7 @@
#define AHCI_PORT_PRIV_DMA_SZ (AHCI_CMD_SLOT_SZ + AHCI_CMD_TBL_AR_SZ + \
AHCI_RX_FIS_SZ)
-#define AHCI_IRQ_ON_SG (1 << 31)
+#define AHCI_IRQ_ON_SG (1U << 31)
#define AHCI_CMD_ATAPI (1 << 5)
#define AHCI_CMD_WRITE (1 << 6)
#define AHCI_CMD_PREFETCH (1 << 7)
@@ -61,7 +61,7 @@
/* HOST_CTL bits */
#define HOST_CTL_RESET (1 << 0) /* reset controller; self-clear */
#define HOST_CTL_IRQ_EN (1 << 1) /* global IRQ enable */
-#define HOST_CTL_AHCI_EN (1 << 31) /* AHCI enabled */
+#define HOST_CTL_AHCI_EN (1U << 31) /* AHCI enabled */
/* HOST_CAP bits */
#define HOST_CAP_SSC (1 << 14) /* Slumber capable */
@@ -69,7 +69,7 @@
#define HOST_CAP_CLO (1 << 24) /* Command List Override support */
#define HOST_CAP_SSS (1 << 27) /* Staggered Spin-up */
#define HOST_CAP_NCQ (1 << 30) /* Native Command Queueing */
-#define HOST_CAP_64 (1 << 31) /* PCI DAC (64-bit DMA) support */
+#define HOST_CAP_64 (1U << 31) /* PCI DAC (64-bit DMA) support */
/* registers for each SATA port */
#define PORT_LST_ADDR 0x00 /* command list DMA addr */
@@ -89,7 +89,7 @@
#define PORT_RESERVED 0x3c /* reserved */
/* PORT_IRQ_{STAT,MASK} bits */
-#define PORT_IRQ_COLD_PRES (1 << 31) /* cold presence detect */
+#define PORT_IRQ_COLD_PRES (1U << 31) /* cold presence detect */
#define PORT_IRQ_TF_ERR (1 << 30) /* task file error */
#define PORT_IRQ_HBUS_ERR (1 << 29) /* host bus fatal error */
#define PORT_IRQ_HBUS_DATA_ERR (1 << 28) /* host bus data error */
@@ -151,7 +151,7 @@
#define PORT_IRQ_STAT_HBDS (1 << 28) /* Host Bus Data Error Status */
#define PORT_IRQ_STAT_HBFS (1 << 29) /* Host Bus Fatal Error Status */
#define PORT_IRQ_STAT_TFES (1 << 30) /* Task File Error Status */
-#define PORT_IRQ_STAT_CPDS (1 << 31) /* Code Port Detect Status */
+#define PORT_IRQ_STAT_CPDS (1U << 31) /* Code Port Detect Status */
/* ap->flags bits */
#define AHCI_FLAG_NO_NCQ (1 << 24)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 19/19] block: qemu-iotests 085 - live snapshots tests
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (17 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 18/19] hw/ide/ahci.h: Avoid shifting left into sign bit Kevin Wolf
@ 2014-03-07 13:33 ` Kevin Wolf
2014-03-08 12:40 ` [Qemu-devel] [PULL 00/19] Block patches Peter Maydell
19 siblings, 0 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-03-07 13:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
From: Jeff Cody <jcody@redhat.com>
This adds tests for live snapshots, both through the single
snapshot command, and the transaction group snapshot command.
The snapshots are done through the QMP interface, using the
following commands for snapshots:
Single snapshot:
{ 'execute': 'blockdev-snapshot-sync', 'arguments':
{ 'device': 'virtio0', 'snapshot-file':'...',
'format': 'qcow2' } }"
Group snapshot:
{ 'execute': 'transaction', 'arguments':
{'actions': [
{ 'type': 'blockdev-snapshot-sync', 'data' :
{ 'device': 'virtio0', 'snapshot-file': '...' } },
{ 'type': 'blockdev-snapshot-sync', 'data' :
{ 'device': 'virtio1', 'snapshot-file': '...' } } ]
} }
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/085 | 192 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/085.out | 55 +++++++++++++
tests/qemu-iotests/group | 1 +
3 files changed, 248 insertions(+)
create mode 100755 tests/qemu-iotests/085
create mode 100644 tests/qemu-iotests/085.out
diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085
new file mode 100755
index 0000000..33c8dc4
--- /dev/null
+++ b/tests/qemu-iotests/085
@@ -0,0 +1,192 @@
+#!/bin/bash
+#
+# Live snapshot tests
+#
+# This tests live snapshots of images on a running QEMU instance, using
+# QMP commands. Both single disk snapshots, and transactional group
+# snapshots are performed.
+#
+# Copyright (C) 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# creator
+owner=jcody@redhat.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+status=1 # failure is the default!
+qemu_pid=
+
+QMP_IN="${TEST_DIR}/qmp-in-$$"
+QMP_OUT="${TEST_DIR}/qmp-out-$$"
+
+snapshot_virt0="snapshot-v0.qcow2"
+snapshot_virt1="snapshot-v1.qcow2"
+
+MAX_SNAPSHOTS=10
+
+_cleanup()
+{
+ kill -KILL ${qemu_pid}
+ wait ${qemu_pid} 2>/dev/null # silent kill
+
+ rm -f "${QMP_IN}" "${QMP_OUT}"
+ for i in $(seq 1 ${MAX_SNAPSHOTS})
+ do
+ rm -f "${TEST_DIR}/${i}-${snapshot_virt0}"
+ rm -f "${TEST_DIR}/${i}-${snapshot_virt1}"
+ done
+ _cleanup_test_img
+
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fmt qcow2
+_supported_proto file
+_supported_os Linux
+
+# Wait for expected QMP response from QEMU. Will time out
+# after 10 seconds, which counts as failure.
+#
+# $1 is the string to expect
+#
+# If $silent is set to anything but an empty string, then
+# response is not echoed out.
+function timed_wait_for()
+{
+ while read -t 10 resp <&5
+ do
+ if [ "${silent}" == "" ]; then
+ echo "${resp}" | _filter_testdir | _filter_qemu
+ fi
+ grep -q "${1}" < <(echo ${resp})
+ if [ $? -eq 0 ]; then
+ return
+ fi
+ done
+ echo "Timeout waiting for ${1}"
+ exit 1 # Timeout means the test failed
+}
+
+# Sends QMP command to QEMU, and waits for the expected response
+#
+# ${1}: String of the QMP command to send
+# ${2}: String that the QEMU response should contain
+function send_qmp_cmd()
+{
+ echo "${1}" >&6
+ timed_wait_for "${2}"
+}
+
+# ${1}: unique identifier for the snapshot filename
+function create_single_snapshot()
+{
+ cmd="{ 'execute': 'blockdev-snapshot-sync',
+ 'arguments': { 'device': 'virtio0',
+ 'snapshot-file':'"${TEST_DIR}/${1}-${snapshot_virt0}"',
+ 'format': 'qcow2' } }"
+ send_qmp_cmd "${cmd}" "return"
+}
+
+# ${1}: unique identifier for the snapshot filename
+function create_group_snapshot()
+{
+ cmd="{ 'execute': 'transaction', 'arguments':
+ {'actions': [
+ { 'type': 'blockdev-snapshot-sync', 'data' :
+ { 'device': 'virtio0',
+ 'snapshot-file': '"${TEST_DIR}/${1}-${snapshot_virt0}"' } },
+ { 'type': 'blockdev-snapshot-sync', 'data' :
+ { 'device': 'virtio1',
+ 'snapshot-file': '"${TEST_DIR}/${1}-${snapshot_virt1}"' } } ]
+ } }"
+
+ send_qmp_cmd "${cmd}" "return"
+}
+
+size=128M
+
+mkfifo "${QMP_IN}"
+mkfifo "${QMP_OUT}"
+
+_make_test_img $size
+mv "${TEST_IMG}" "${TEST_IMG}.orig"
+_make_test_img $size
+
+echo
+echo === Running QEMU ===
+echo
+
+"${QEMU}" -nographic -monitor none -serial none -qmp stdio\
+ -drive file="${TEST_IMG}.orig",if=virtio\
+ -drive file="${TEST_IMG}",if=virtio 2>&1 >"${QMP_OUT}" <"${QMP_IN}"&
+qemu_pid=$!
+
+# redirect fifos to file descriptors, to keep from blocking
+exec 5<"${QMP_OUT}"
+exec 6>"${QMP_IN}"
+
+# Don't print response, since it has version information in it
+silent=yes timed_wait_for "capabilities"
+
+echo
+echo === Sending capabilities ===
+echo
+
+send_qmp_cmd "{ 'execute': 'qmp_capabilities' }" "return"
+
+echo
+echo === Create a single snapshot on virtio0 ===
+echo
+
+create_single_snapshot 1
+
+
+echo
+echo === Invalid command - missing device and nodename ===
+echo
+
+send_qmp_cmd "{ 'execute': 'blockdev-snapshot-sync',
+ 'arguments': { 'snapshot-file':'"${TEST_DIR}"/1-${snapshot_virt0}',
+ 'format': 'qcow2' } }" "error"
+
+echo
+echo === Invalid command - missing snapshot-file ===
+echo
+
+send_qmp_cmd "{ 'execute': 'blockdev-snapshot-sync',
+ 'arguments': { 'device': 'virtio0',
+ 'format': 'qcow2' } }" "error"
+echo
+echo
+echo === Create several transactional group snapshots ===
+echo
+
+for i in $(seq 2 ${MAX_SNAPSHOTS})
+do
+ create_group_snapshot ${i}
+done
+
+# success, all done
+echo "*** done"
+rm -f $seq.full
+status=0
diff --git a/tests/qemu-iotests/085.out b/tests/qemu-iotests/085.out
new file mode 100644
index 0000000..0f2b17f
--- /dev/null
+++ b/tests/qemu-iotests/085.out
@@ -0,0 +1,55 @@
+QA output created by 085
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+
+=== Running QEMU ===
+
+
+=== Sending capabilities ===
+
+{"return": {}}
+
+=== Create a single snapshot on virtio0 ===
+
+Formatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/t.qcow2.orig' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+
+=== Invalid command - missing device and nodename ===
+
+{"error": {"class": "GenericError", "desc": "Cannot find device= nor node_name="}}
+
+=== Invalid command - missing snapshot-file ===
+
+{"error": {"class": "GenericError", "desc": "Parameter 'snapshot-file' is missing"}}
+
+
+=== Create several transactional group snapshots ===
+
+Formatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/1-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/t.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/2-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/2-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/3-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/3-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/4-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/4-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/5-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/6-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/5-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/7-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/6-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/7-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/6-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/8-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/7-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/8-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/7-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/9-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/8-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/9-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/8-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+Formatting 'TEST_DIR/10-snapshot-v0.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/9-snapshot-v0.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+Formatting 'TEST_DIR/10-snapshot-v1.qcow2', fmt=qcow2 size=134217728 backing_file='TEST_DIR/9-snapshot-v1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
+{"return": {}}
+*** done
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 9ec62d2..e96eafd 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -85,5 +85,6 @@
079 rw auto
081 rw auto
082 rw auto quick
+085 rw auto quick
086 rw auto quick
087 rw auto quick
--
1.8.1.4
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
` (18 preceding siblings ...)
2014-03-07 13:33 ` [Qemu-devel] [PULL 19/19] block: qemu-iotests 085 - live snapshots tests Kevin Wolf
@ 2014-03-08 12:40 ` Peter Maydell
19 siblings, 0 replies; 36+ messages in thread
From: Peter Maydell @ 2014-03-08 12:40 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 7 March 2014 13:32, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit f55ea6297cc0224fe4934b90ff5343b620b14669:
>
> block/gluster: Add missing argument to qemu_gluster_init() call (2014-03-04 20:20:57 +0000)
>
> are available in the git repository at:
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 4089f7c6a0d91020ca60ce8300784c93dd9ddcbe:
>
> block: qemu-iotests 085 - live snapshots tests (2014-03-07 11:36:12 +0100)
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2014-12-12 17:09 Stefan Hajnoczi
2014-12-15 11:11 ` Peter Maydell
0 siblings, 1 reply; 36+ messages in thread
From: Stefan Hajnoczi @ 2014-12-12 17:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit 99c9c3cb24e566258a0a141178934f9cb5198842:
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2014-12-11' into staging (2014-12-11 18:27:02 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 82595da8dedde128d8004ec47441aeb720c08704:
linux-aio: simplify removal of completed iocbs from the list (2014-12-12 16:57:55 +0000)
----------------------------------------------------------------
----------------------------------------------------------------
Fam Zheng (2):
qemu-iotests: Remove traling whitespaces in *.out
block: Don't add trailing space in "Formating..." message
Gary R Hook (1):
block migration: fix return value
Gonglei (1):
block/rbd: fix memory leak
Jeff Cody (4):
block: vhdx - remove redundant comments
block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec
block: vhdx - change .vhdx_create default block state to ZERO
block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1
Max Reitz (5):
vmdk: Fix error for JSON descriptor file names
iotests: Add test for vmdk JSON file names
qemu-io: Add sigraise command
iotests: Filter for "Killed" in qemu-io output
iotests: Fix test 039
Paolo Bonzini (5):
linux-aio: queue requests that cannot be submitted
linux-aio: track whether the queue is blocked
linux-aio: rename LaioQueue idx field to "n"
linux-aio: drop return code from laio_io_unplug and ioq_submit
linux-aio: simplify removal of completed iocbs from the list
Stefan Hajnoczi (1):
block: drop unused bdrv_clear_incoming_migration_all() prototype
block-migration.c | 10 +-
block.c | 6 +-
block/linux-aio.c | 99 ++++++-------
block/raw-aio.h | 2 +-
block/rbd.c | 8 +-
block/vhdx.c | 18 ++-
block/vhdx.h | 3 +-
block/vmdk.c | 10 +-
include/block/block.h | 3 +-
include/qemu/option.h | 2 +-
include/qemu/queue.h | 11 ++
qemu-doc.texi | 6 +-
qemu-io-cmds.c | 46 ++++++
tests/qemu-iotests/001.out | 2 +-
tests/qemu-iotests/002.out | 2 +-
tests/qemu-iotests/003.out | 2 +-
tests/qemu-iotests/004.out | 2 +-
tests/qemu-iotests/005.out | 2 +-
tests/qemu-iotests/006.out | 2 +-
tests/qemu-iotests/007.out | 2 +-
tests/qemu-iotests/008.out | 2 +-
tests/qemu-iotests/009.out | 2 +-
tests/qemu-iotests/010.out | 2 +-
tests/qemu-iotests/011.out | 2 +-
tests/qemu-iotests/012.out | 2 +-
tests/qemu-iotests/013.out | 2 +-
tests/qemu-iotests/014.out | 2 +-
tests/qemu-iotests/015.out | 2 +-
tests/qemu-iotests/016.out | 2 +-
tests/qemu-iotests/017.out | 2 +-
tests/qemu-iotests/018.out | 2 +-
tests/qemu-iotests/019.out | 4 +-
tests/qemu-iotests/020.out | 4 +-
tests/qemu-iotests/021.out | 2 +-
tests/qemu-iotests/022.out | 2 +-
tests/qemu-iotests/023.out | 16 +--
tests/qemu-iotests/024.out | 6 +-
tests/qemu-iotests/025.out | 2 +-
tests/qemu-iotests/026.out | 300 +++++++++++++++++++--------------------
tests/qemu-iotests/027.out | 2 +-
tests/qemu-iotests/028.out | 6 +-
tests/qemu-iotests/029.out | 8 +-
tests/qemu-iotests/031.out | 4 +-
tests/qemu-iotests/032.out | 2 +-
tests/qemu-iotests/033.out | 2 +-
tests/qemu-iotests/034.out | 4 +-
tests/qemu-iotests/035.out | 2 +-
tests/qemu-iotests/036.out | 6 +-
tests/qemu-iotests/037.out | 4 +-
tests/qemu-iotests/038.out | 4 +-
tests/qemu-iotests/039 | 18 ++-
tests/qemu-iotests/039.out | 18 +--
tests/qemu-iotests/042.out | 2 +-
tests/qemu-iotests/043.out | 52 +++----
tests/qemu-iotests/046.out | 4 +-
tests/qemu-iotests/047.out | 2 +-
tests/qemu-iotests/048.out | 4 +-
tests/qemu-iotests/049.out | 112 +++++++--------
tests/qemu-iotests/050.out | 6 +-
tests/qemu-iotests/051.out | 6 +-
tests/qemu-iotests/052.out | 2 +-
tests/qemu-iotests/053.out | 2 +-
tests/qemu-iotests/054.out | 4 +-
tests/qemu-iotests/059 | 6 +
tests/qemu-iotests/059.out | 4 +
tests/qemu-iotests/060.out | 22 +--
tests/qemu-iotests/061.out | 44 +++---
tests/qemu-iotests/062.out | 2 +-
tests/qemu-iotests/066.out | 2 +-
tests/qemu-iotests/067.out | 2 +-
tests/qemu-iotests/068.out | 2 +-
tests/qemu-iotests/069.out | 4 +-
tests/qemu-iotests/071.out | 8 +-
tests/qemu-iotests/072.out | 2 +-
tests/qemu-iotests/073.out | 4 +-
tests/qemu-iotests/077.out | 2 +-
tests/qemu-iotests/080.out | 24 ++--
tests/qemu-iotests/081.out | 6 +-
tests/qemu-iotests/082.out | 14 +-
tests/qemu-iotests/084.out | 4 +-
tests/qemu-iotests/086.out | 2 +-
tests/qemu-iotests/087.out | 6 +-
tests/qemu-iotests/088.out | 2 +-
tests/qemu-iotests/089.out | 4 +-
tests/qemu-iotests/090.out | 2 +-
tests/qemu-iotests/091.out | 2 +-
tests/qemu-iotests/092.out | 8 +-
tests/qemu-iotests/095.out | 6 +-
tests/qemu-iotests/097.out | 24 ++--
tests/qemu-iotests/098.out | 16 +--
tests/qemu-iotests/099.out | 4 +-
tests/qemu-iotests/100.out | 14 +-
tests/qemu-iotests/103.out | 2 +-
tests/qemu-iotests/104.out | 4 +-
tests/qemu-iotests/107.out | 2 +-
tests/qemu-iotests/108.out | 12 +-
tests/qemu-iotests/common.filter | 2 +-
util/qemu-option.c | 10 +-
98 files changed, 619 insertions(+), 527 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-12 17:09 Stefan Hajnoczi
@ 2014-12-15 11:11 ` Peter Maydell
0 siblings, 0 replies; 36+ messages in thread
From: Peter Maydell @ 2014-12-15 11:11 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers
On 12 December 2014 at 17:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 99c9c3cb24e566258a0a141178934f9cb5198842:
>
> Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2014-12-11' into staging (2014-12-11 18:27:02 +0000)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 82595da8dedde128d8004ec47441aeb720c08704:
>
> linux-aio: simplify removal of completed iocbs from the list (2014-12-12 16:57:55 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2014-12-19 16:34 Kevin Wolf
2014-12-22 11:14 ` Peter Maydell
2015-01-05 11:55 ` Stefan Hajnoczi
0 siblings, 2 replies; 36+ messages in thread
From: Kevin Wolf @ 2014-12-19 16:34 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
The following changes since commit dfa9c2a0f4d0a0c8b2c1449ecdbb1297427e1560:
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-12-15 16:43:42 +0000)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 55873077d9e00c4da12ba1068bd9566fc6c32388:
iotests: Filter out "I/O thread spun..." warning (2014-12-19 17:17:47 +0100)
----------------------------------------------------------------
Block patches for 2.3
----------------------------------------------------------------
Fam Zheng (8):
qemu-iotests: Remove 091 from quick group
qemu-iotests: Speed up make check-block
tests/Makefile: Add check-block to make check
qapi: Fix document for BlockStats.node-name
qapi: Comment version info in TransactionAction
qmp: Add command 'blockdev-backup'
block: Add blockdev-backup to transaction
qemu-iotests: Test blockdev-backup in 055
Kevin Wolf (1):
Merge remote-tracking branch 'mreitz/block' into queue-block
Max Reitz (7):
checkpatch: Brace handling on multi-line condition
block: Get full backing filename from string
block: JSON filenames and relative backing files
block: Relative backing file for image creation
block/vmdk: Relative backing file for creation
iotests: Add test for relative backing file names
iotests: Filter out "I/O thread spun..." warning
Paolo Bonzini (3):
block: mark AioContext as recursive
block: do not allocate an iovec per read of a growable/zero_after_eof BDS
block: replace g_new0 with g_new for bottom half allocation.
Vladimir Sementsov-Ogievskiy (1):
block: fix spoiling all dirty bitmaps by mirror and migration
async.c | 11 +-
block-migration.c | 5 +-
block.c | 81 ++++++++++++---
block/backup.c | 28 ++++++
block/mirror.c | 11 +-
block/qapi.c | 7 +-
block/vmdk.c | 13 ++-
blockdev.c | 133 ++++++++++++++++++++++++
include/block/block.h | 12 ++-
qapi-schema.json | 8 ++
qapi/block-core.json | 56 ++++++++++-
qmp-commands.hx | 42 ++++++++
scripts/checkpatch.pl | 13 ++-
tests/Makefile | 2 +-
tests/qemu-iotests-quick.sh | 2 +-
tests/qemu-iotests/055 | 211 ++++++++++++++++++++++++++++++++-------
tests/qemu-iotests/055.out | 4 +-
tests/qemu-iotests/067 | 3 +-
tests/qemu-iotests/071 | 2 +-
tests/qemu-iotests/071.out | 8 +-
tests/qemu-iotests/081 | 2 +-
tests/qemu-iotests/087 | 3 +-
tests/qemu-iotests/087.out | 1 -
tests/qemu-iotests/099 | 2 +-
tests/qemu-iotests/110 | 94 +++++++++++++++++
tests/qemu-iotests/110.out | 19 ++++
tests/qemu-iotests/check | 1 +
tests/qemu-iotests/common.filter | 1 +
tests/qemu-iotests/group | 3 +-
29 files changed, 692 insertions(+), 86 deletions(-)
create mode 100755 tests/qemu-iotests/110
create mode 100644 tests/qemu-iotests/110.out
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-19 16:34 Kevin Wolf
@ 2014-12-22 11:14 ` Peter Maydell
2014-12-22 12:07 ` Peter Maydell
2015-01-05 11:55 ` Stefan Hajnoczi
1 sibling, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2014-12-22 11:14 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 19 December 2014 at 16:34, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit dfa9c2a0f4d0a0c8b2c1449ecdbb1297427e1560:
>
> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-12-15 16:43:42 +0000)
>
> are available in the git repository at:
>
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 55873077d9e00c4da12ba1068bd9566fc6c32388:
>
> iotests: Filter out "I/O thread spun..." warning (2014-12-19 17:17:47 +0100)
>
> ----------------------------------------------------------------
> Block patches for 2.3
Hi. I'm afraid this fails "make check" on MacOSX:
/Users/pm215/src/qemu/tests/qemu-iotests-quick.sh
/Users/pm215/src/qemu/tests/qemu-iotests/common.config: line 158:
/bin/true: No such file or directory
check: failed to source common.config
On OSX "true" is /usr/bin/true. common.config should just use
"true" here I think, and let the shell figure out where it is
(typically a builtin, obviously).
thanks
-- PMM
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-22 11:14 ` Peter Maydell
@ 2014-12-22 12:07 ` Peter Maydell
2014-12-22 12:22 ` Peter Maydell
0 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2014-12-22 12:07 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 22 December 2014 at 11:14, Peter Maydell <peter.maydell@linaro.org> wrote:
> Hi. I'm afraid this fails "make check" on MacOSX:
> /Users/pm215/src/qemu/tests/qemu-iotests-quick.sh
> /Users/pm215/src/qemu/tests/qemu-iotests/common.config: line 158:
> /bin/true: No such file or directory
> check: failed to source common.config
>
> On OSX "true" is /usr/bin/true. common.config should just use
> "true" here I think, and let the shell figure out where it is
> (typically a builtin, obviously).
common.rc and common.filter also have this bug. With those
fixed, 'make check-block' now runs two tests (most are skipped
with "not suitable for this OS: Darwin"), of which 058 fails:
===begin===
058 [12:01:48] [12:01:49] - output mismatch (see 058.out.bad)
--- /Users/pm215/src/qemu/tests/qemu-iotests/058.out 2014-02-17
23:38:30.000000000 +0000
+++ 058.out.bad 2014-12-22 12:01:49.000000000 +0000
@@ -1,44 +1,37 @@
QA output created by 058
== preparing image ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-wrote 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
cluster_size=65536 lazy_refcounts=off
+wite [-bcCpqz] [-P patten ] off len -- wites a numbe of bytes at a
specified offset
+wite [-bcCpqz] [-P patten ] off len -- wites a numbe of bytes at a
specified offset
+wite [-bcCpqz] [-P patten ] off len -- wites a numbe of bytes at a
specified offset
+wite [-bcCpqz] [-P patten ] off len -- wites a numbe of bytes at a
specified offset
No errors were found on the image.
+Image end offset: 393216
== verifying the image file with patterns ==
-read 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
== verifying the exported snapshot with patterns, method 1 ==
-read 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
== verifying the exported snapshot with patterns, method 2 ==
-read 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
+ead [-abCpqv] [-P patten [-s off] [-l len]] off len -- eads a numbe
of bytes at a specified offset
+qemu-img: Could not open '-l': Could not open '-l': No such file or directory
== verifying the converted snapshot with patterns, method 1 ==
-read 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open device .converted: Could not open '.converted':
No such file or directory
+no file open, try 'help open'
+qemu-io: can't open device .converted: Could not open '.converted':
No such file or directory
+no file open, try 'help open'
+qemu-img: Could not open '-l': Could not open '-l': No such file or directory
== verifying the converted snapshot with patterns, method 2 ==
-read 4096/4096 bytes at offset 4096
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-read 4096/4096 bytes at offset 8192
-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: can't open device .converted: Could not open '.converted':
No such file or directory
+no file open, try 'help open'
+qemu-io: can't open device .converted: Could not open '.converted':
No such file or directory
+no file open, try 'help open'
*** done
===endit===
Something very odd is happening here: why are all the "r"s apparently
missing from those error messages?
-- PMM
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-22 12:07 ` Peter Maydell
@ 2014-12-22 12:22 ` Peter Maydell
2014-12-23 2:15 ` Fam Zheng
0 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2014-12-22 12:22 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 22 December 2014 at 12:07, Peter Maydell <peter.maydell@linaro.org> wrote:
> Something very odd is happening here: why are all the "r"s apparently
> missing from those error messages?
Looks like the result of using GNU sed-isms in some of the filters. On OSX:
$ echo "art trick" | sed -e 's/\r//g'
at tick
On Linux with GNU sed:
$ echo "art trick" | sed -e 's/\r//g'
art trick
This likely breaks on the BSDs too. I suspect these scripts need
a careful overhaul before we can add them to 'make check' :-(
-- PMM
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-22 12:22 ` Peter Maydell
@ 2014-12-23 2:15 ` Fam Zheng
0 siblings, 0 replies; 36+ messages in thread
From: Fam Zheng @ 2014-12-23 2:15 UTC (permalink / raw)
To: Peter Maydell; +Cc: Kevin Wolf, QEMU Developers
On Mon, 12/22 12:22, Peter Maydell wrote:
> On 22 December 2014 at 12:07, Peter Maydell <peter.maydell@linaro.org> wrote:
> > Something very odd is happening here: why are all the "r"s apparently
> > missing from those error messages?
>
> Looks like the result of using GNU sed-isms in some of the filters. On OSX:
>
> $ echo "art trick" | sed -e 's/\r//g'
> at tick
>
> On Linux with GNU sed:
> $ echo "art trick" | sed -e 's/\r//g'
> art trick
>
> This likely breaks on the BSDs too. I suspect these scripts need
> a careful overhaul before we can add them to 'make check' :-(
>
Oops! Thanks Peter, I'll take care of it and respin. We should drop these
patches from this PULL for now.
Fam
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Qemu-devel] [PULL 00/19] Block patches
@ 2015-01-05 11:51 Stefan Hajnoczi
0 siblings, 0 replies; 36+ messages in thread
From: Stefan Hajnoczi @ 2015-01-05 11:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit ab0302ee764fd702465aef6d88612cdff4302809:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20141223' into staging (2014-12-23 15:05:22 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 3bd54e576f40f1d5bf45b4828c7316efd76a4db6:
migration/block: fix pending() return value (2015-01-05 11:34:52 +0000)
----------------------------------------------------------------
----------------------------------------------------------------
Fam Zheng (7):
qemu-iotests: Remove 091 from quick group
qemu-iotests: Speed up make check-block
qapi: Fix document for BlockStats.node-name
qapi: Comment version info in TransactionAction
qmp: Add command 'blockdev-backup'
block: Add blockdev-backup to transaction
qemu-iotests: Test blockdev-backup in 055
Max Reitz (7):
checkpatch: Brace handling on multi-line condition
block: Get full backing filename from string
block: JSON filenames and relative backing files
block: Relative backing file for image creation
block/vmdk: Relative backing file for creation
iotests: Add test for relative backing file names
iotests: Filter out "I/O thread spun..." warning
Paolo Bonzini (3):
block: mark AioContext as recursive
block: do not allocate an iovec per read of a growable/zero_after_eof
BDS
block: replace g_new0 with g_new for bottom half allocation.
Vladimir Sementsov-Ogievskiy (2):
block: fix spoiling all dirty bitmaps by mirror and migration
migration/block: fix pending() return value
async.c | 11 +-
block.c | 81 ++++++++++++---
block/backup.c | 28 ++++++
block/mirror.c | 11 +-
block/qapi.c | 7 +-
block/vmdk.c | 13 ++-
blockdev.c | 133 ++++++++++++++++++++++++
include/block/block.h | 12 ++-
migration/block.c | 9 +-
qapi-schema.json | 8 ++
qapi/block-core.json | 56 ++++++++++-
qmp-commands.hx | 42 ++++++++
scripts/checkpatch.pl | 13 ++-
tests/qemu-iotests-quick.sh | 2 +-
tests/qemu-iotests/055 | 211 ++++++++++++++++++++++++++++++++-------
tests/qemu-iotests/055.out | 4 +-
tests/qemu-iotests/067 | 3 +-
tests/qemu-iotests/071 | 2 +-
tests/qemu-iotests/071.out | 8 +-
tests/qemu-iotests/081 | 2 +-
tests/qemu-iotests/087 | 3 +-
tests/qemu-iotests/087.out | 1 -
tests/qemu-iotests/099 | 2 +-
tests/qemu-iotests/110 | 94 +++++++++++++++++
tests/qemu-iotests/110.out | 19 ++++
tests/qemu-iotests/check | 1 +
tests/qemu-iotests/common.filter | 1 +
tests/qemu-iotests/group | 3 +-
28 files changed, 693 insertions(+), 87 deletions(-)
create mode 100755 tests/qemu-iotests/110
create mode 100644 tests/qemu-iotests/110.out
--
2.1.0
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [Qemu-devel] [PULL 00/19] Block patches
2014-12-19 16:34 Kevin Wolf
2014-12-22 11:14 ` Peter Maydell
@ 2015-01-05 11:55 ` Stefan Hajnoczi
1 sibling, 0 replies; 36+ messages in thread
From: Stefan Hajnoczi @ 2015-01-05 11:55 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On Fri, Dec 19, 2014 at 4:34 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit dfa9c2a0f4d0a0c8b2c1449ecdbb1297427e1560:
>
> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-12-15 16:43:42 +0000)
>
> are available in the git repository at:
>
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to 55873077d9e00c4da12ba1068bd9566fc6c32388:
>
> iotests: Filter out "I/O thread spun..." warning (2014-12-19 17:17:47 +0100)
Taking over from Kevin since he is on vacation.
I dropped the patch that adds qemu-iotests to make check for now.
Once Fam has resolved the issues we can merge that patch again.
I've sent a new pull request.
Stefan
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2015-01-05 11:56 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 13:32 [Qemu-devel] [PULL 00/19] Block patches Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 01/19] gluster: Change licence to GPLv2+ Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 02/19] gluster: Remove unused defines and header include Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 03/19] qemu-img convert: Fix progress output Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 04/19] qemu-iotests: Test progress output for conversion Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 05/19] iscsi: Use bs->sg for everything else than disks Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 06/19] block: Fix bs->request_alignment assertion for bs->sg=1 Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 07/19] block: make bdrv_swap rebuild the bs graph node list field Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 08/19] block: mirror - remove code cruft that has no function Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 09/19] block: Keep "filename" option after parsing Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 10/19] block/raw-posix: Implement bdrv_parse_filename() Kevin Wolf
2014-03-07 13:32 ` [Qemu-devel] [PULL 11/19] block/raw-posix: Strip "file:" prefix on creation Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 12/19] block/raw-win32: Implement bdrv_parse_filename() Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creation Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 14/19] blockdev: Fail blockdev-add with encrypted images Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 15/19] blockdev: Fix NULL pointer dereference in blockdev-add Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 16/19] qemu-iotests: Test a few blockdev-add error cases Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 17/19] block: Fix error path segfault in bdrv_open() Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 18/19] hw/ide/ahci.h: Avoid shifting left into sign bit Kevin Wolf
2014-03-07 13:33 ` [Qemu-devel] [PULL 19/19] block: qemu-iotests 085 - live snapshots tests Kevin Wolf
2014-03-08 12:40 ` [Qemu-devel] [PULL 00/19] Block patches Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2015-01-05 11:51 Stefan Hajnoczi
2014-12-19 16:34 Kevin Wolf
2014-12-22 11:14 ` Peter Maydell
2014-12-22 12:07 ` Peter Maydell
2014-12-22 12:22 ` Peter Maydell
2014-12-23 2:15 ` Fam Zheng
2015-01-05 11:55 ` Stefan Hajnoczi
2014-12-12 17:09 Stefan Hajnoczi
2014-12-15 11:11 ` Peter Maydell
2012-09-24 14:26 Kevin Wolf
2012-09-25 23:26 ` Anthony Liguori
2011-10-21 17:18 Kevin Wolf
2011-10-24 16:19 ` Anthony Liguori
2010-06-15 14:19 Kevin Wolf
2010-06-15 14:26 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).