* [Qemu-devel] [PULL 00/12] Block patches
@ 2011-06-08 13:48 Kevin Wolf
2011-06-09 12:39 ` Anthony Liguori
0 siblings, 1 reply; 41+ messages in thread
From: Kevin Wolf @ 2011-06-08 13:48 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit a90d4690074526f54ad0851fce19fa6783f06803:
Add an isa device for SGA (2011-06-07 13:52:30 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Alexander Graf (1):
vmdk: fix endianness bugs
Christoph Egger (2):
block/raw-posix: use a character device if a block device is given
block/raw-posix: get right partition size
Christoph Hellwig (1):
block: clarify the meaning of BDRV_O_NOCACHE
Josh Durgin (4):
rbd: use the higher level librbd instead of just librados
rbd: allow configuration of rados from the rbd filename
rbd: check return values when scheduling aio
rbd: Add bdrv_truncate implementation
Kevin Wolf (4):
ide/core: Remove explicit setting of BM_STATUS_INT
qcow2: Fix memory leaks in error cases
bdrv_img_create: Fix segfault
qemu-img create: Fix displayed default cluster size
block.c | 13 +-
block/qcow2-cluster.c | 2 +-
block/qcow2-refcount.c | 9 +-
block/qcow2.c | 7 +-
block/qcow2.h | 2 +
block/qed.c | 3 +-
block/raw-posix.c | 77 ++++-
block/raw-win32.c | 12 +-
block/rbd.c | 896 ++++++++++++++++++------------------------------
block/rbd_types.h | 71 ----
block/vdi.c | 6 +-
block/vmdk.c | 22 +-
blockdev.c | 2 +-
configure | 33 +--
hw/ide/core.c | 7 +-
qemu-io.c | 4 +-
qemu-nbd.c | 2 +-
17 files changed, 461 insertions(+), 707 deletions(-)
delete mode 100644 block/rbd_types.h
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2011-06-08 13:48 Kevin Wolf
@ 2011-06-09 12:39 ` Anthony Liguori
0 siblings, 0 replies; 41+ messages in thread
From: Anthony Liguori @ 2011-06-09 12:39 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On 06/08/2011 08:48 AM, Kevin Wolf wrote:
> The following changes since commit a90d4690074526f54ad0851fce19fa6783f06803:
>
> Add an isa device for SGA (2011-06-07 13:52:30 -0500)
>
> are available in the git repository at:
> git://repo.or.cz/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Alexander Graf (1):
> vmdk: fix endianness bugs
>
> Christoph Egger (2):
> block/raw-posix: use a character device if a block device is given
> block/raw-posix: get right partition size
>
> Christoph Hellwig (1):
> block: clarify the meaning of BDRV_O_NOCACHE
>
> Josh Durgin (4):
> rbd: use the higher level librbd instead of just librados
> rbd: allow configuration of rados from the rbd filename
> rbd: check return values when scheduling aio
> rbd: Add bdrv_truncate implementation
>
> Kevin Wolf (4):
> ide/core: Remove explicit setting of BM_STATUS_INT
> qcow2: Fix memory leaks in error cases
> bdrv_img_create: Fix segfault
> qemu-img create: Fix displayed default cluster size
>
> block.c | 13 +-
> block/qcow2-cluster.c | 2 +-
> block/qcow2-refcount.c | 9 +-
> block/qcow2.c | 7 +-
> block/qcow2.h | 2 +
> block/qed.c | 3 +-
> block/raw-posix.c | 77 ++++-
> block/raw-win32.c | 12 +-
> block/rbd.c | 896 ++++++++++++++++++------------------------------
> block/rbd_types.h | 71 ----
> block/vdi.c | 6 +-
> block/vmdk.c | 22 +-
> blockdev.c | 2 +-
> configure | 33 +--
> hw/ide/core.c | 7 +-
> qemu-io.c | 4 +-
> qemu-nbd.c | 2 +-
> 17 files changed, 461 insertions(+), 707 deletions(-)
> delete mode 100644 block/rbd_types.h
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2012-06-04 11:13 Kevin Wolf
2012-06-07 1:17 ` Anthony Liguori
0 siblings, 1 reply; 41+ messages in thread
From: Kevin Wolf @ 2012-06-04 11:13 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git for-anthony
Josh Durgin (1):
rbd: hook up cache options
Kevin Wolf (3):
qemu-img check -r for repairing images
qemu-img check: Print fixed clusters and recheck
qcow2: Support for fixing refcount inconsistencies
MORITA Kazutaka (1):
sheepdog: add coroutine_fn markers to coroutine functions
Markus Armbruster (1):
Un-inline fdctrl_init_isa()
Paolo Bonzini (4):
block: implement is_allocated for raw
stream: tweak usage of bdrv_co_is_allocated
stream: move is_allocated_above to block.c
stream: move rate limiting to a separate header file
Zhi Yong Wu (2):
qcow2: remove a line of unnecessary code
qcow2: fix the byte endian convertion
block.c | 53 +++++++++++++++++++++-
block.h | 13 +++++-
block/qcow2-cluster.c | 1 -
block/qcow2-refcount.c | 33 ++++++++++++--
block/qcow2.c | 5 +-
block/qcow2.h | 3 +-
block/qed-check.c | 2 +
block/qed.c | 5 +-
block/raw-posix.c | 98 +++++++++++++++++++++++++++++++++++++++++
block/raw.c | 8 +++
block/rbd.c | 19 ++++++++
block/sheepdog.c | 9 ++--
block/stream.c | 109 +++++++---------------------------------------
block/vdi.c | 7 +++-
block_int.h | 3 +-
hw/fdc.c | 20 ++++++++
hw/fdc.h | 24 +---------
hw/ide/piix.c | 3 +-
hw/isa.h | 2 -
hw/pc_sysfw.c | 1 +
include/qemu/ratelimit.h | 48 ++++++++++++++++++++
qemu-common.h | 1 +
qemu-img-cmds.hx | 4 +-
qemu-img.c | 35 +++++++++++++-
qemu-img.texi | 7 +++-
25 files changed, 369 insertions(+), 144 deletions(-)
create mode 100644 include/qemu/ratelimit.h
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-06-04 11:13 Kevin Wolf
@ 2012-06-07 1:17 ` Anthony Liguori
2012-06-08 9:48 ` Kevin Wolf
0 siblings, 1 reply; 41+ messages in thread
From: Anthony Liguori @ 2012-06-07 1:17 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On 06/04/2012 07:13 PM, Kevin Wolf wrote:
> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>
> target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>
> are available in the git repository at:
> git://repo.or.cz/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Josh Durgin (1):
> rbd: hook up cache options
>
> Kevin Wolf (3):
> qemu-img check -r for repairing images
> qemu-img check: Print fixed clusters and recheck
> qcow2: Support for fixing refcount inconsistencies
>
> MORITA Kazutaka (1):
> sheepdog: add coroutine_fn markers to coroutine functions
>
> Markus Armbruster (1):
> Un-inline fdctrl_init_isa()
>
> Paolo Bonzini (4):
> block: implement is_allocated for raw
> stream: tweak usage of bdrv_co_is_allocated
> stream: move is_allocated_above to block.c
> stream: move rate limiting to a separate header file
>
> Zhi Yong Wu (2):
> qcow2: remove a line of unnecessary code
> qcow2: fix the byte endian convertion
>
> block.c | 53 +++++++++++++++++++++-
> block.h | 13 +++++-
> block/qcow2-cluster.c | 1 -
> block/qcow2-refcount.c | 33 ++++++++++++--
> block/qcow2.c | 5 +-
> block/qcow2.h | 3 +-
> block/qed-check.c | 2 +
> block/qed.c | 5 +-
> block/raw-posix.c | 98 +++++++++++++++++++++++++++++++++++++++++
> block/raw.c | 8 +++
> block/rbd.c | 19 ++++++++
> block/sheepdog.c | 9 ++--
> block/stream.c | 109 +++++++---------------------------------------
> block/vdi.c | 7 +++-
> block_int.h | 3 +-
> hw/fdc.c | 20 ++++++++
> hw/fdc.h | 24 +---------
> hw/ide/piix.c | 3 +-
> hw/isa.h | 2 -
> hw/pc_sysfw.c | 1 +
> include/qemu/ratelimit.h | 48 ++++++++++++++++++++
> qemu-common.h | 1 +
> qemu-img-cmds.hx | 4 +-
> qemu-img.c | 35 +++++++++++++-
> qemu-img.texi | 7 +++-
> 25 files changed, 369 insertions(+), 144 deletions(-)
> create mode 100644 include/qemu/ratelimit.h
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-06-07 1:17 ` Anthony Liguori
@ 2012-06-08 9:48 ` Kevin Wolf
2012-06-08 14:07 ` Anthony Liguori
0 siblings, 1 reply; 41+ messages in thread
From: Kevin Wolf @ 2012-06-08 9:48 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
Am 07.06.2012 03:17, schrieb Anthony Liguori:
> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>
>> target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>
>> are available in the git repository at:
>> git://repo.or.cz/qemu/kevin.git for-anthony
>
> Pulled. Thanks.
But not pushed?
Kevin
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-06-08 9:48 ` Kevin Wolf
@ 2012-06-08 14:07 ` Anthony Liguori
2012-06-08 14:57 ` Kevin Wolf
0 siblings, 1 reply; 41+ messages in thread
From: Anthony Liguori @ 2012-06-08 14:07 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On 06/08/2012 05:48 PM, Kevin Wolf wrote:
> Am 07.06.2012 03:17, schrieb Anthony Liguori:
>> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>>
>>> target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>>
>>> are available in the git repository at:
>>> git://repo.or.cz/qemu/kevin.git for-anthony
>>
>> Pulled. Thanks.
>
> But not pushed?
I'm having a really hard time connecting to repo.or.cz here. Looks like I
mistook a timeout for success and mistakenly merged nothing.
I'm still having trouble getting to repo.or.cz. I'll be back in the States
Saturday evening so will process this pull Sunday or Monday.
Do you want to update the branch in the interim to fix the build issue?
Regards,
Anthony Liguori
>
> Kevin
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-06-08 14:07 ` Anthony Liguori
@ 2012-06-08 14:57 ` Kevin Wolf
0 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-06-08 14:57 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
Am 08.06.2012 16:07, schrieb Anthony Liguori:
> On 06/08/2012 05:48 PM, Kevin Wolf wrote:
>> Am 07.06.2012 03:17, schrieb Anthony Liguori:
>>> On 06/04/2012 07:13 PM, Kevin Wolf wrote:
>>>> The following changes since commit 8cc9b43f7c5f826b39af4b012ad89bb55faac29c:
>>>>
>>>> target-microblaze: lwx/swx: first implementation (2012-06-04 10:19:46 +0200)
>>>>
>>>> are available in the git repository at:
>>>> git://repo.or.cz/qemu/kevin.git for-anthony
>>>
>>> Pulled. Thanks.
>>
>> But not pushed?
>
> I'm having a really hard time connecting to repo.or.cz here. Looks like I
> mistook a timeout for success and mistakenly merged nothing.
>
> I'm still having trouble getting to repo.or.cz. I'll be back in the States
> Saturday evening so will process this pull Sunday or Monday.
Hm, when repo.or.cz started behaving bad, I started to use things like
'while ! git fetch repo.or.cz; do sleep 1; done' (it would always
succeed after a few attempts), but recently it never needed more than
one attempt.
> Do you want to update the branch in the interim to fix the build issue?
Sure, updated it now.
Kevin
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2012-08-06 20:44 Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 01/12] ide scsi: Mess with geometry only for hard disk devices Kevin Wolf
` (13 more replies)
0 siblings, 14 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:
virtio: fix vhost handling (2012-08-06 14:01:44 -0500)
are available in the git repository at:
http://repo.or.cz/r/qemu/kevin.git for-anthony
Dong Xu Wang (1):
qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
Kevin Wolf (1):
qemu-iotests: Be more flexible with image creation options
Markus Armbruster (1):
ide scsi: Mess with geometry only for hard disk devices
Paolo Bonzini (1):
qapi: generalize documentation of streaming commands
Stefan Hajnoczi (8):
qemu-iotests: add qed.py image manipulation utility
docs: add dirty bit to qcow2 specification
qcow2: introduce dirty bit
docs: add lazy refcounts bit to qcow2 specification
qemu-iotests: ignore qemu-img create lazy_refcounts output
qcow2: implement lazy refcounts
qemu-io: add "abort" command to simulate program crash
qemu-iotests: add 039 qcow2 lazy refcounts test
block/qcow2-cluster.c | 5 +-
block/qcow2.c | 123 +++++++++++++++++++++--
block/qcow2.h | 21 ++++
block_int.h | 26 +++--
docs/specs/qcow2.txt | 14 ++-
hmp-commands.hx | 2 +-
hw/ide/qdev.c | 3 +-
hw/scsi-disk.c | 3 +-
qapi-schema.json | 17 ++--
qemu-img.c | 28 +++--
qemu-io.c | 12 ++
tests/qemu-iotests/031.out | 20 ++--
tests/qemu-iotests/036.out | 4 +-
tests/qemu-iotests/039 | 136 ++++++++++++++++++++++++
tests/qemu-iotests/039.out | 53 ++++++++++
tests/qemu-iotests/common.rc | 7 +-
tests/qemu-iotests/group | 1 +
tests/qemu-iotests/qed.py | 235 ++++++++++++++++++++++++++++++++++++++++++
18 files changed, 650 insertions(+), 60 deletions(-)
create mode 100755 tests/qemu-iotests/039
create mode 100644 tests/qemu-iotests/039.out
create mode 100755 tests/qemu-iotests/qed.py
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 01/12] ide scsi: Mess with geometry only for hard disk devices
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 02/12] qapi: generalize documentation of streaming commands Kevin Wolf
` (12 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Markus Armbruster <armbru@redhat.com>
Legacy -drive cyls=... are now ignored completely when the drive
doesn't back a hard disk device. Before, they were first checked
against a hard disk's limits, then ignored.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/ide/qdev.c | 3 ++-
hw/scsi-disk.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 22e58df..5ea9b8f 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -149,7 +149,8 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
}
blkconf_serial(&dev->conf, &dev->serial);
- if (blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) {
+ if (kind != IDE_CD
+ && blkconf_geometry(&dev->conf, &dev->chs_trans, 65536, 16, 255) < 0) {
return -1;
}
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index a9c7279..c8d5edd 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -1958,7 +1958,8 @@ static int scsi_initfn(SCSIDevice *dev)
}
blkconf_serial(&s->qdev.conf, &s->serial);
- if (blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) {
+ if (dev->type == TYPE_DISK
+ && blkconf_geometry(&dev->conf, NULL, 65535, 255, 255) < 0) {
return -1;
}
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 02/12] qapi: generalize documentation of streaming commands
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 01/12] ide scsi: Mess with geometry only for hard disk devices Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 03/12] qemu-iotests: add qed.py image manipulation utility Kevin Wolf
` (11 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Paolo Bonzini <pbonzini@redhat.com>
Talk about background operations in general, rather than specifically
about streaming.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hmp-commands.hx | 2 +-
qapi-schema.json | 17 ++++++++---------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index eea8b32..9bbc7f7 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -101,7 +101,7 @@ ETEXI
.name = "block_job_cancel",
.args_type = "device:B",
.params = "device",
- .help = "stop an active block streaming operation",
+ .help = "stop an active background block operation",
.mhandler.cmd = hmp_block_job_cancel,
},
diff --git a/qapi-schema.json b/qapi-schema.json
index cddf63a..bd9c450 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1660,7 +1660,7 @@
# Returns: Nothing on success
# If the job type does not support throttling, NotSupported
# If the speed value is invalid, InvalidParameter
-# If streaming is not active on this device, DeviceNotActive
+# If no background operation is active on this device, DeviceNotActive
#
# Since: 1.1
##
@@ -1670,9 +1670,9 @@
##
# @block-job-cancel:
#
-# Stop an active block streaming operation.
+# Stop an active background block operation.
#
-# This command returns immediately after marking the active block streaming
+# This command returns immediately after marking the active background block
# operation for cancellation. It is an error to call this command if no
# operation is in progress.
#
@@ -1680,16 +1680,15 @@
# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
# enumerated using query-block-jobs.
#
-# The image file retains its backing file unless the streaming operation happens
-# to complete just as it is being cancelled.
-#
-# A new block streaming operation can be started at a later time to finish
-# copying all data from the backing file.
+# For streaming, the image file retains its backing file unless the streaming
+# operation happens to complete just as it is being cancelled. A new streaming
+# operation can be started at a later time to finish copying all data from the
+# backing file.
#
# @device: the device name
#
# Returns: Nothing on success
-# If streaming is not active on this device, DeviceNotActive
+# If no background operation is active on this device, DeviceNotActive
# If cancellation already in progress, DeviceInUse
#
# Since: 1.1
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 03/12] qemu-iotests: add qed.py image manipulation utility
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 01/12] ide scsi: Mess with geometry only for hard disk devices Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 02/12] qapi: generalize documentation of streaming commands Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 04/12] docs: add dirty bit to qcow2 specification Kevin Wolf
` (10 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
The qed.py utility can inspect and manipulate QED image files. It can
be used for testing to see the state of image metadata and also to
inject corruptions into the image file. It also has a scrubbing feature
to copy just the metadata out of an image file, allowing users to share
broken image files without revealing data in bug reports.
This has lived in my local repo for a long time but could be useful
to others.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/qed.py | 235 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 235 insertions(+), 0 deletions(-)
create mode 100755 tests/qemu-iotests/qed.py
diff --git a/tests/qemu-iotests/qed.py b/tests/qemu-iotests/qed.py
new file mode 100755
index 0000000..52ff845
--- /dev/null
+++ b/tests/qemu-iotests/qed.py
@@ -0,0 +1,235 @@
+#!/usr/bin/env python
+#
+# Tool to manipulate QED image files
+#
+# Copyright (C) 2010 IBM, Corp.
+#
+# Authors:
+# Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or later.
+# See the COPYING file in the top-level directory.
+
+import sys
+import struct
+import random
+import optparse
+
+# This can be used as a module
+__all__ = ['QED_F_NEED_CHECK', 'QED']
+
+QED_F_NEED_CHECK = 0x02
+
+header_fmt = '<IIIIQQQQQII'
+header_size = struct.calcsize(header_fmt)
+field_names = ['magic', 'cluster_size', 'table_size',
+ 'header_size', 'features', 'compat_features',
+ 'autoclear_features', 'l1_table_offset', 'image_size',
+ 'backing_filename_offset', 'backing_filename_size']
+table_elem_fmt = '<Q'
+table_elem_size = struct.calcsize(table_elem_fmt)
+
+def err(msg):
+ sys.stderr.write(msg + '\n')
+ sys.exit(1)
+
+def unpack_header(s):
+ fields = struct.unpack(header_fmt, s)
+ return dict((field_names[idx], val) for idx, val in enumerate(fields))
+
+def pack_header(header):
+ fields = tuple(header[x] for x in field_names)
+ return struct.pack(header_fmt, *fields)
+
+def unpack_table_elem(s):
+ return struct.unpack(table_elem_fmt, s)[0]
+
+def pack_table_elem(elem):
+ return struct.pack(table_elem_fmt, elem)
+
+class QED(object):
+ def __init__(self, f):
+ self.f = f
+
+ self.f.seek(0, 2)
+ self.filesize = f.tell()
+
+ self.load_header()
+ self.load_l1_table()
+
+ def raw_pread(self, offset, size):
+ self.f.seek(offset)
+ return self.f.read(size)
+
+ def raw_pwrite(self, offset, data):
+ self.f.seek(offset)
+ return self.f.write(data)
+
+ def load_header(self):
+ self.header = unpack_header(self.raw_pread(0, header_size))
+
+ def store_header(self):
+ self.raw_pwrite(0, pack_header(self.header))
+
+ def read_table(self, offset):
+ size = self.header['table_size'] * self.header['cluster_size']
+ s = self.raw_pread(offset, size)
+ table = [unpack_table_elem(s[i:i + table_elem_size]) for i in xrange(0, size, table_elem_size)]
+ return table
+
+ def load_l1_table(self):
+ self.l1_table = self.read_table(self.header['l1_table_offset'])
+ self.table_nelems = self.header['table_size'] * self.header['cluster_size'] / table_elem_size
+
+ def write_table(self, offset, table):
+ s = ''.join(pack_table_elem(x) for x in table)
+ self.raw_pwrite(offset, s)
+
+def random_table_item(table):
+ vals = [(index, offset) for index, offset in enumerate(table) if offset != 0]
+ if not vals:
+ err('cannot pick random item because table is empty')
+ return random.choice(vals)
+
+def corrupt_table_duplicate(table):
+ '''Corrupt a table by introducing a duplicate offset'''
+ victim_idx, victim_val = random_table_item(table)
+ unique_vals = set(table)
+ if len(unique_vals) == 1:
+ err('no duplication corruption possible in table')
+ dup_val = random.choice(list(unique_vals.difference([victim_val])))
+ table[victim_idx] = dup_val
+
+def corrupt_table_invalidate(qed, table):
+ '''Corrupt a table by introducing an invalid offset'''
+ index, _ = random_table_item(table)
+ table[index] = qed.filesize + random.randint(0, 100 * 1024 * 1024 * 1024 * 1024)
+
+def cmd_show(qed, *args):
+ '''show [header|l1|l2 <offset>]- Show header or l1/l2 tables'''
+ if not args or args[0] == 'header':
+ print qed.header
+ elif args[0] == 'l1':
+ print qed.l1_table
+ elif len(args) == 2 and args[0] == 'l2':
+ offset = int(args[1])
+ print qed.read_table(offset)
+ else:
+ err('unrecognized sub-command')
+
+def cmd_duplicate(qed, table_level):
+ '''duplicate l1|l2 - Duplicate a random table element'''
+ if table_level == 'l1':
+ offset = qed.header['l1_table_offset']
+ table = qed.l1_table
+ elif table_level == 'l2':
+ _, offset = random_table_item(qed.l1_table)
+ table = qed.read_table(offset)
+ else:
+ err('unrecognized sub-command')
+ corrupt_table_duplicate(table)
+ qed.write_table(offset, table)
+
+def cmd_invalidate(qed, table_level):
+ '''invalidate l1|l2 - Plant an invalid table element at random'''
+ if table_level == 'l1':
+ offset = qed.header['l1_table_offset']
+ table = qed.l1_table
+ elif table_level == 'l2':
+ _, offset = random_table_item(qed.l1_table)
+ table = qed.read_table(offset)
+ else:
+ err('unrecognized sub-command')
+ corrupt_table_invalidate(qed, table)
+ qed.write_table(offset, table)
+
+def cmd_need_check(qed, *args):
+ '''need-check [on|off] - Test, set, or clear the QED_F_NEED_CHECK header bit'''
+ if not args:
+ print bool(qed.header['features'] & QED_F_NEED_CHECK)
+ return
+
+ if args[0] == 'on':
+ qed.header['features'] |= QED_F_NEED_CHECK
+ elif args[0] == 'off':
+ qed.header['features'] &= ~QED_F_NEED_CHECK
+ else:
+ err('unrecognized sub-command')
+ qed.store_header()
+
+def cmd_zero_cluster(qed, pos, *args):
+ '''zero-cluster <pos> [<n>] - Zero data clusters'''
+ pos, n = int(pos), 1
+ if args:
+ if len(args) != 1:
+ err('expected one argument')
+ n = int(args[0])
+
+ for i in xrange(n):
+ l1_index = pos / qed.header['cluster_size'] / len(qed.l1_table)
+ if qed.l1_table[l1_index] == 0:
+ err('no l2 table allocated')
+
+ l2_offset = qed.l1_table[l1_index]
+ l2_table = qed.read_table(l2_offset)
+
+ l2_index = (pos / qed.header['cluster_size']) % len(qed.l1_table)
+ l2_table[l2_index] = 1 # zero the data cluster
+ qed.write_table(l2_offset, l2_table)
+ pos += qed.header['cluster_size']
+
+def cmd_copy_metadata(qed, outfile):
+ '''copy-metadata <outfile> - Copy metadata only (for scrubbing corrupted images)'''
+ out = open(outfile, 'wb')
+
+ # Match file size
+ out.seek(qed.filesize - 1)
+ out.write('\0')
+
+ # Copy header clusters
+ out.seek(0)
+ header_size_bytes = qed.header['header_size'] * qed.header['cluster_size']
+ out.write(qed.raw_pread(0, header_size_bytes))
+
+ # Copy L1 table
+ out.seek(qed.header['l1_table_offset'])
+ s = ''.join(pack_table_elem(x) for x in qed.l1_table)
+ out.write(s)
+
+ # Copy L2 tables
+ for l2_offset in qed.l1_table:
+ if l2_offset == 0:
+ continue
+ l2_table = qed.read_table(l2_offset)
+ out.seek(l2_offset)
+ s = ''.join(pack_table_elem(x) for x in l2_table)
+ out.write(s)
+
+ out.close()
+
+def usage():
+ print 'Usage: %s <file> <cmd> [<arg>, ...]' % sys.argv[0]
+ print
+ print 'Supported commands:'
+ for cmd in sorted(x for x in globals() if x.startswith('cmd_')):
+ print globals()[cmd].__doc__
+ sys.exit(1)
+
+def main():
+ if len(sys.argv) < 3:
+ usage()
+ filename, cmd = sys.argv[1:3]
+
+ cmd = 'cmd_' + cmd.replace('-', '_')
+ if cmd not in globals():
+ usage()
+
+ qed = QED(open(filename, 'r+b'))
+ try:
+ globals()[cmd](qed, *sys.argv[3:])
+ except TypeError, e:
+ sys.stderr.write(globals()[cmd].__doc__ + '\n')
+ sys.exit(1)
+
+if __name__ == '__main__':
+ main()
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 04/12] docs: add dirty bit to qcow2 specification
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (2 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 03/12] qemu-iotests: add qed.py image manipulation utility Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 05/12] qcow2: introduce dirty bit Kevin Wolf
` (9 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
The dirty bit will make it possible to perform lazy refcount updates,
where the image file is not kept consistent all the time. Upon opening
a dirty image file, it is necessary to perform a consistency check and
repair any incorrect refcounts.
Therefore the dirty bit must be an incompatible feature bit. We don't
want old programs accessing a file with stale refcounts.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
docs/specs/qcow2.txt | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt
index 87bf785..339cdc1 100644
--- a/docs/specs/qcow2.txt
+++ b/docs/specs/qcow2.txt
@@ -75,7 +75,12 @@ in the description of a field.
Bitmask of incompatible features. An implementation must
fail to open an image if an unknown bit is set.
- Bits 0-63: Reserved (set to 0)
+ Bit 0: Dirty bit. If this bit is set then refcounts
+ may be inconsistent, make sure to scan L1/L2
+ tables to repair refcounts before accessing the
+ image.
+
+ Bits 1-63: Reserved (set to 0)
80 - 87: compatible_features
Bitmask of compatible features. An implementation can
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 05/12] qcow2: introduce dirty bit
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (3 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 04/12] docs: add dirty bit to qcow2 specification Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 06/12] docs: add lazy refcounts bit to qcow2 specification Kevin Wolf
` (8 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This patch adds an incompatible feature bit to mark images that have not
been closed cleanly. When a dirty image file is opened a consistency
check and repair is performed.
Update qemu-iotests 031 and 036 since the extension header size changes
when we add feature bit table entries.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2.c | 50 +++++++++++++++++++++++++++++++++++++++++--
block/qcow2.h | 8 +++++++
tests/qemu-iotests/031.out | 20 ++++++++--------
tests/qemu-iotests/036.out | 4 +-
4 files changed, 67 insertions(+), 15 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 870148d..7fe1567 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -214,6 +214,27 @@ static void report_unsupported_feature(BlockDriverState *bs,
}
}
+/*
+ * Clears the dirty bit and flushes before if necessary. Only call this
+ * function when there are no pending requests, it does not guard against
+ * concurrent requests dirtying the image.
+ */
+static int qcow2_mark_clean(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+
+ if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
+ int ret = bdrv_flush(bs);
+ if (ret < 0) {
+ return ret;
+ }
+
+ s->incompatible_features &= ~QCOW2_INCOMPAT_DIRTY;
+ return qcow2_update_header(bs);
+ }
+ return 0;
+}
+
static int qcow2_open(BlockDriverState *bs, int flags)
{
BDRVQcowState *s = bs->opaque;
@@ -287,12 +308,13 @@ static int qcow2_open(BlockDriverState *bs, int flags)
s->compatible_features = header.compatible_features;
s->autoclear_features = header.autoclear_features;
- if (s->incompatible_features != 0) {
+ if (s->incompatible_features & ~QCOW2_INCOMPAT_MASK) {
void *feature_table = NULL;
qcow2_read_extensions(bs, header.header_length, ext_end,
&feature_table);
report_unsupported_feature(bs, feature_table,
- s->incompatible_features);
+ s->incompatible_features &
+ ~QCOW2_INCOMPAT_MASK);
ret = -ENOTSUP;
goto fail;
}
@@ -412,6 +434,22 @@ static int qcow2_open(BlockDriverState *bs, int flags)
/* Initialise locks */
qemu_co_mutex_init(&s->lock);
+ /* Repair image if dirty */
+ if ((s->incompatible_features & QCOW2_INCOMPAT_DIRTY) &&
+ !bs->read_only) {
+ BdrvCheckResult result = {0};
+
+ ret = qcow2_check_refcounts(bs, &result, BDRV_FIX_ERRORS);
+ if (ret < 0) {
+ goto fail;
+ }
+
+ ret = qcow2_mark_clean(bs);
+ if (ret < 0) {
+ goto fail;
+ }
+ }
+
#ifdef DEBUG_ALLOC
{
BdrvCheckResult result = {0};
@@ -785,6 +823,8 @@ static void qcow2_close(BlockDriverState *bs)
qcow2_cache_flush(bs, s->l2_table_cache);
qcow2_cache_flush(bs, s->refcount_block_cache);
+ qcow2_mark_clean(bs);
+
qcow2_cache_destroy(bs, s->l2_table_cache);
qcow2_cache_destroy(bs, s->refcount_block_cache);
@@ -949,7 +989,11 @@ int qcow2_update_header(BlockDriverState *bs)
/* Feature table */
Qcow2Feature features[] = {
- /* no feature defined yet */
+ {
+ .type = QCOW2_FEAT_TYPE_INCOMPATIBLE,
+ .bit = QCOW2_INCOMPAT_DIRTY_BITNR,
+ .name = "dirty bit",
+ },
};
ret = header_ext_add(buf, QCOW2_EXT_MAGIC_FEATURE_TABLE,
diff --git a/block/qcow2.h b/block/qcow2.h
index 455b6d7..b5fefc0 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -110,6 +110,14 @@ enum {
QCOW2_FEAT_TYPE_AUTOCLEAR = 2,
};
+/* Incompatible feature bits */
+enum {
+ QCOW2_INCOMPAT_DIRTY_BITNR = 0,
+ QCOW2_INCOMPAT_DIRTY = 1 << QCOW2_INCOMPAT_DIRTY_BITNR,
+
+ QCOW2_INCOMPAT_MASK = QCOW2_INCOMPAT_DIRTY,
+};
+
typedef struct Qcow2Feature {
uint8_t type;
uint8_t bit;
diff --git a/tests/qemu-iotests/031.out b/tests/qemu-iotests/031.out
index d3cab30..297b458 100644
--- a/tests/qemu-iotests/031.out
+++ b/tests/qemu-iotests/031.out
@@ -54,8 +54,8 @@ header_length 72
Header extension:
magic 0x6803f857
-length 0
-data ''
+length 48
+data <binary>
Header extension:
magic 0x12345678
@@ -68,7 +68,7 @@ No errors were found on the image.
magic 0x514649fb
version 2
-backing_file_offset 0x98
+backing_file_offset 0xc8
backing_file_size 0x17
cluster_bits 16
size 67108864
@@ -92,8 +92,8 @@ data 'host_device'
Header extension:
magic 0x6803f857
-length 0
-data ''
+length 48
+data <binary>
Header extension:
magic 0x12345678
@@ -155,8 +155,8 @@ header_length 104
Header extension:
magic 0x6803f857
-length 0
-data ''
+length 48
+data <binary>
Header extension:
magic 0x12345678
@@ -169,7 +169,7 @@ No errors were found on the image.
magic 0x514649fb
version 3
-backing_file_offset 0xb8
+backing_file_offset 0xe8
backing_file_size 0x17
cluster_bits 16
size 67108864
@@ -193,8 +193,8 @@ data 'host_device'
Header extension:
magic 0x6803f857
-length 0
-data ''
+length 48
+data <binary>
Header extension:
magic 0x12345678
diff --git a/tests/qemu-iotests/036.out b/tests/qemu-iotests/036.out
index 6953e37..ca0fda1 100644
--- a/tests/qemu-iotests/036.out
+++ b/tests/qemu-iotests/036.out
@@ -46,7 +46,7 @@ header_length 104
Header extension:
magic 0x6803f857
-length 0
-data ''
+length 48
+data <binary>
*** done
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 06/12] docs: add lazy refcounts bit to qcow2 specification
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (4 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 05/12] qcow2: introduce dirty bit Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 07/12] qemu-iotests: ignore qemu-img create lazy_refcounts output Kevin Wolf
` (7 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
The lazy refcounts bit indicates that this image can take advantage of
the dirty bit and that refcount updates can be postponed.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
docs/specs/qcow2.txt | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt
index 339cdc1..36a559d 100644
--- a/docs/specs/qcow2.txt
+++ b/docs/specs/qcow2.txt
@@ -86,7 +86,12 @@ in the description of a field.
Bitmask of compatible features. An implementation can
safely ignore any unknown bits that are set.
- Bits 0-63: Reserved (set to 0)
+ Bit 0: Lazy refcounts bit. If this bit is set then
+ lazy refcount updates can be used. This means
+ marking the image file dirty and postponing
+ refcount metadata updates.
+
+ Bits 1-63: Reserved (set to 0)
88 - 95: autoclear_features
Bitmask of auto-clear features. An implementation may only
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 07/12] qemu-iotests: ignore qemu-img create lazy_refcounts output
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (5 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 06/12] docs: add lazy refcounts bit to qcow2 specification Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 08/12] qcow2: implement lazy refcounts Kevin Wolf
` (6 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Hide the default lazy_refcounts=off output from qemu-img like we do with
other image creation options. This ensures that existing golden outputs
continue to pass despite the new option that has been added.
Note that this patch applies before the one that actually introduces the
lazy_refcounts=on|off option. This ensures git-bisect(1) continues to
work.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/common.rc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 5e3a524..cc4e39b 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -113,7 +113,8 @@ _make_test_img()
sed -e "s# table_size=0##g" | \
sed -e "s# compat='[^']*'##g" | \
sed -e "s# compat6=off##g" | \
- sed -e "s# static=off##g"
+ sed -e "s# static=off##g" | \
+ sed -e "s# lazy_refcounts=off##g"
}
_cleanup_test_img()
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 08/12] qcow2: implement lazy refcounts
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (6 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 07/12] qemu-iotests: ignore qemu-img create lazy_refcounts output Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 09/12] qemu-io: add "abort" command to simulate program crash Kevin Wolf
` (5 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Lazy refcounts is a performance optimization for qcow2 that postpones
refcount metadata updates and instead marks the image dirty. In the
case of crash or power failure the image will be left in a dirty state
and repaired next time it is opened.
Reducing metadata I/O is important for cache=writethrough and
cache=directsync because these modes guarantee that data is on disk
after each write (hence we cannot take advantage of caching updates in
RAM). Refcount metadata is not needed for guest->file block address
translation and therefore does not need to be on-disk at the time of
write completion - this is the motivation behind the lazy refcount
optimization.
The lazy refcount optimization must be enabled at image creation time:
qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on a.qcow2 10G
qemu-system-x86_64 -drive if=virtio,file=a.qcow2,cache=writethrough
Update qemu-iotests 031 and 036 since the extension header size changes
when we add feature bit table entries.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2-cluster.c | 5 ++-
block/qcow2.c | 73 +++++++++++++++++++++++++++++++++++++++++--
block/qcow2.h | 13 ++++++++
block_int.h | 26 ++++++++-------
tests/qemu-iotests/031.out | 12 +++---
tests/qemu-iotests/036.out | 2 +-
6 files changed, 107 insertions(+), 24 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index d7e0e19..e179211 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -662,7 +662,10 @@ int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m)
qcow2_cache_depends_on_flush(s->l2_table_cache);
}
- qcow2_cache_set_dependency(bs, s->l2_table_cache, s->refcount_block_cache);
+ if (qcow2_need_accurate_refcounts(s)) {
+ qcow2_cache_set_dependency(bs, s->l2_table_cache,
+ s->refcount_block_cache);
+ }
ret = get_cluster_table(bs, m->offset, &l2_table, &l2_index);
if (ret < 0) {
goto err;
diff --git a/block/qcow2.c b/block/qcow2.c
index 7fe1567..fd5e214 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -215,6 +215,41 @@ static void report_unsupported_feature(BlockDriverState *bs,
}
/*
+ * Sets the dirty bit and flushes afterwards if necessary.
+ *
+ * The incompatible_features bit is only set if the image file header was
+ * updated successfully. Therefore it is not required to check the return
+ * value of this function.
+ */
+static int qcow2_mark_dirty(BlockDriverState *bs)
+{
+ BDRVQcowState *s = bs->opaque;
+ uint64_t val;
+ int ret;
+
+ assert(s->qcow_version >= 3);
+
+ if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) {
+ return 0; /* already dirty */
+ }
+
+ val = cpu_to_be64(s->incompatible_features | QCOW2_INCOMPAT_DIRTY);
+ ret = bdrv_pwrite(bs->file, offsetof(QCowHeader, incompatible_features),
+ &val, sizeof(val));
+ if (ret < 0) {
+ return ret;
+ }
+ ret = bdrv_flush(bs->file);
+ if (ret < 0) {
+ return ret;
+ }
+
+ /* Only treat image as dirty if the header was updated successfully */
+ s->incompatible_features |= QCOW2_INCOMPAT_DIRTY;
+ return 0;
+}
+
+/*
* Clears the dirty bit and flushes before if necessary. Only call this
* function when there are no pending requests, it does not guard against
* concurrent requests dirtying the image.
@@ -752,6 +787,11 @@ static coroutine_fn int qcow2_co_writev(BlockDriverState *bs,
goto fail;
}
+ if (l2meta.nb_clusters > 0 &&
+ (s->compatible_features & QCOW2_COMPAT_LAZY_REFCOUNTS)) {
+ qcow2_mark_dirty(bs);
+ }
+
cluster_offset = l2meta.cluster_offset;
assert((cluster_offset & 511) == 0);
@@ -994,6 +1034,11 @@ int qcow2_update_header(BlockDriverState *bs)
.bit = QCOW2_INCOMPAT_DIRTY_BITNR,
.name = "dirty bit",
},
+ {
+ .type = QCOW2_FEAT_TYPE_COMPATIBLE,
+ .bit = QCOW2_COMPAT_LAZY_REFCOUNTS_BITNR,
+ .name = "lazy refcounts",
+ },
};
ret = header_ext_add(buf, QCOW2_EXT_MAGIC_FEATURE_TABLE,
@@ -1176,6 +1221,11 @@ static int qcow2_create2(const char *filename, int64_t total_size,
header.crypt_method = cpu_to_be32(QCOW_CRYPT_NONE);
}
+ if (flags & BLOCK_FLAG_LAZY_REFCOUNTS) {
+ header.compatible_features |=
+ cpu_to_be64(QCOW2_COMPAT_LAZY_REFCOUNTS);
+ }
+
ret = bdrv_pwrite(bs, 0, &header, sizeof(header));
if (ret < 0) {
goto out;
@@ -1289,6 +1339,8 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options)
options->value.s);
return -EINVAL;
}
+ } else if (!strcmp(options->name, BLOCK_OPT_LAZY_REFCOUNTS)) {
+ flags |= options->value.n ? BLOCK_FLAG_LAZY_REFCOUNTS : 0;
}
options++;
}
@@ -1299,6 +1351,12 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options)
return -EINVAL;
}
+ if (version < 3 && (flags & BLOCK_FLAG_LAZY_REFCOUNTS)) {
+ fprintf(stderr, "Lazy refcounts only supported with compatibility "
+ "level 1.1 and above (use compat=1.1 or greater)\n");
+ return -EINVAL;
+ }
+
return qcow2_create2(filename, sectors, backing_file, backing_fmt, flags,
cluster_size, prealloc, options, version);
}
@@ -1485,10 +1543,12 @@ static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs)
return ret;
}
- ret = qcow2_cache_flush(bs, s->refcount_block_cache);
- if (ret < 0) {
- qemu_co_mutex_unlock(&s->lock);
- return ret;
+ if (qcow2_need_accurate_refcounts(s)) {
+ ret = qcow2_cache_flush(bs, s->refcount_block_cache);
+ if (ret < 0) {
+ qemu_co_mutex_unlock(&s->lock);
+ return ret;
+ }
}
qemu_co_mutex_unlock(&s->lock);
@@ -1603,6 +1663,11 @@ static QEMUOptionParameter qcow2_create_options[] = {
.type = OPT_STRING,
.help = "Preallocation mode (allowed values: off, metadata)"
},
+ {
+ .name = BLOCK_OPT_LAZY_REFCOUNTS,
+ .type = OPT_FLAG,
+ .help = "Postpone refcount updates",
+ },
{ NULL }
};
diff --git a/block/qcow2.h b/block/qcow2.h
index b5fefc0..b4eb654 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -118,6 +118,14 @@ enum {
QCOW2_INCOMPAT_MASK = QCOW2_INCOMPAT_DIRTY,
};
+/* Compatible feature bits */
+enum {
+ QCOW2_COMPAT_LAZY_REFCOUNTS_BITNR = 0,
+ QCOW2_COMPAT_LAZY_REFCOUNTS = 1 << QCOW2_COMPAT_LAZY_REFCOUNTS_BITNR,
+
+ QCOW2_COMPAT_FEAT_MASK = QCOW2_COMPAT_LAZY_REFCOUNTS,
+};
+
typedef struct Qcow2Feature {
uint8_t type;
uint8_t bit;
@@ -245,6 +253,11 @@ static inline int qcow2_get_cluster_type(uint64_t l2_entry)
}
}
+/* Check whether refcounts are eager or lazy */
+static inline bool qcow2_need_accurate_refcounts(BDRVQcowState *s)
+{
+ return !(s->incompatible_features & QCOW2_INCOMPAT_DIRTY);
+}
// FIXME Need qcow2_ prefix to global functions
diff --git a/block_int.h b/block_int.h
index d72317f..6c1d9ca 100644
--- a/block_int.h
+++ b/block_int.h
@@ -31,8 +31,9 @@
#include "qemu-timer.h"
#include "qapi-types.h"
-#define BLOCK_FLAG_ENCRYPT 1
-#define BLOCK_FLAG_COMPAT6 4
+#define BLOCK_FLAG_ENCRYPT 1
+#define BLOCK_FLAG_COMPAT6 4
+#define BLOCK_FLAG_LAZY_REFCOUNTS 8
#define BLOCK_IO_LIMIT_READ 0
#define BLOCK_IO_LIMIT_WRITE 1
@@ -41,16 +42,17 @@
#define BLOCK_IO_SLICE_TIME 100000000
#define NANOSECONDS_PER_SECOND 1000000000.0
-#define BLOCK_OPT_SIZE "size"
-#define BLOCK_OPT_ENCRYPT "encryption"
-#define BLOCK_OPT_COMPAT6 "compat6"
-#define BLOCK_OPT_BACKING_FILE "backing_file"
-#define BLOCK_OPT_BACKING_FMT "backing_fmt"
-#define BLOCK_OPT_CLUSTER_SIZE "cluster_size"
-#define BLOCK_OPT_TABLE_SIZE "table_size"
-#define BLOCK_OPT_PREALLOC "preallocation"
-#define BLOCK_OPT_SUBFMT "subformat"
-#define BLOCK_OPT_COMPAT_LEVEL "compat"
+#define BLOCK_OPT_SIZE "size"
+#define BLOCK_OPT_ENCRYPT "encryption"
+#define BLOCK_OPT_COMPAT6 "compat6"
+#define BLOCK_OPT_BACKING_FILE "backing_file"
+#define BLOCK_OPT_BACKING_FMT "backing_fmt"
+#define BLOCK_OPT_CLUSTER_SIZE "cluster_size"
+#define BLOCK_OPT_TABLE_SIZE "table_size"
+#define BLOCK_OPT_PREALLOC "preallocation"
+#define BLOCK_OPT_SUBFMT "subformat"
+#define BLOCK_OPT_COMPAT_LEVEL "compat"
+#define BLOCK_OPT_LAZY_REFCOUNTS "lazy_refcounts"
typedef struct BdrvTrackedRequest BdrvTrackedRequest;
diff --git a/tests/qemu-iotests/031.out b/tests/qemu-iotests/031.out
index 297b458..796c993 100644
--- a/tests/qemu-iotests/031.out
+++ b/tests/qemu-iotests/031.out
@@ -54,7 +54,7 @@ header_length 72
Header extension:
magic 0x6803f857
-length 48
+length 96
data <binary>
Header extension:
@@ -68,7 +68,7 @@ No errors were found on the image.
magic 0x514649fb
version 2
-backing_file_offset 0xc8
+backing_file_offset 0xf8
backing_file_size 0x17
cluster_bits 16
size 67108864
@@ -92,7 +92,7 @@ data 'host_device'
Header extension:
magic 0x6803f857
-length 48
+length 96
data <binary>
Header extension:
@@ -155,7 +155,7 @@ header_length 104
Header extension:
magic 0x6803f857
-length 48
+length 96
data <binary>
Header extension:
@@ -169,7 +169,7 @@ No errors were found on the image.
magic 0x514649fb
version 3
-backing_file_offset 0xe8
+backing_file_offset 0x118
backing_file_size 0x17
cluster_bits 16
size 67108864
@@ -193,7 +193,7 @@ data 'host_device'
Header extension:
magic 0x6803f857
-length 48
+length 96
data <binary>
Header extension:
diff --git a/tests/qemu-iotests/036.out b/tests/qemu-iotests/036.out
index ca0fda1..063ca22 100644
--- a/tests/qemu-iotests/036.out
+++ b/tests/qemu-iotests/036.out
@@ -46,7 +46,7 @@ header_length 104
Header extension:
magic 0x6803f857
-length 48
+length 96
data <binary>
*** done
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 09/12] qemu-io: add "abort" command to simulate program crash
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (7 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 08/12] qcow2: implement lazy refcounts Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 10/12] qemu-iotests: add 039 qcow2 lazy refcounts test Kevin Wolf
` (4 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Avoiding data loss and corruption is the top requirement for image file
formats. The qemu-io "abort" command makes it possible to simulate
program crashes and does not give the image format a chance to cleanly
shut down. This command is useful for data integrity test cases.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qemu-io.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/qemu-io.c b/qemu-io.c
index 8f3b94b..d0f4fb7 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1652,6 +1652,17 @@ static const cmdinfo_t map_cmd = {
.oneline = "prints the allocated areas of a file",
};
+static int abort_f(int argc, char **argv)
+{
+ abort();
+}
+
+static const cmdinfo_t abort_cmd = {
+ .name = "abort",
+ .cfunc = abort_f,
+ .flags = CMD_NOFILE_OK,
+ .oneline = "simulate a program crash using abort(3)",
+};
static int close_f(int argc, char **argv)
{
@@ -1905,6 +1916,7 @@ int main(int argc, char **argv)
add_command(&discard_cmd);
add_command(&alloc_cmd);
add_command(&map_cmd);
+ add_command(&abort_cmd);
add_args_command(init_args_command);
add_check_command(init_check_command);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 10/12] qemu-iotests: add 039 qcow2 lazy refcounts test
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (8 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 09/12] qemu-io: add "abort" command to simulate program crash Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options Kevin Wolf
` (3 subsequent siblings)
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This tests establishes the basic post-conditions of the qcow2 lazy
refcounts features:
1. If the image was closed normally, it is marked clean.
2. If an allocating write was performed and the image was not closed
normally, then it is marked dirty.
a. Written data can be read back successfully.
b. The image file can be repaired and will be marked clean again.
c. The image file is automatically repaired when opened read/write.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/039 | 136 ++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/039.out | 53 +++++++++++++++++
tests/qemu-iotests/group | 1 +
3 files changed, 190 insertions(+), 0 deletions(-)
create mode 100755 tests/qemu-iotests/039
create mode 100644 tests/qemu-iotests/039.out
diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
new file mode 100755
index 0000000..a749fcf
--- /dev/null
+++ b/tests/qemu-iotests/039
@@ -0,0 +1,136 @@
+#!/bin/bash
+#
+# Test qcow2 lazy refcounts
+#
+# Copyright (C) 2012 Red Hat, Inc.
+# Copyright IBM, Corp. 2010
+#
+# Based on test 038.
+#
+# 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=stefanha@linux.vnet.ibm.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 generic
+_supported_os Linux
+
+size=128M
+
+echo
+echo "== Checking that image is clean on shutdown =="
+
+IMGOPTS="compat=1.1,lazy_refcounts=on"
+_make_test_img $size
+
+$QEMU_IO -c "write -P 0x5a 0 512" $TEST_IMG | _filter_qemu_io
+
+# The dirty bit must not be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+_check_test_img
+
+echo
+echo "== Creating a dirty image file =="
+
+IMGOPTS="compat=1.1,lazy_refcounts=on"
+_make_test_img $size
+
+old_ulimit=$(ulimit -c)
+ulimit -c 0 # do not produce a core dump on abort(3)
+$QEMU_IO -c "write -P 0x5a 0 512" -c "abort" $TEST_IMG | _filter_qemu_io
+ulimit -c "$old_ulimit"
+
+# The dirty bit must be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+_check_test_img
+
+echo
+echo "== Read-only access must still work =="
+
+$QEMU_IO -r -c "read -P 0x5a 0 512" $TEST_IMG | _filter_qemu_io
+
+# The dirty bit must be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+
+echo
+echo "== Repairing the image file must succeed =="
+
+$QEMU_IMG check -r all $TEST_IMG
+
+# The dirty bit must not be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+
+echo
+echo "== Data should still be accessible after repair =="
+
+$QEMU_IO -c "read -P 0x5a 0 512" $TEST_IMG | _filter_qemu_io
+
+echo
+echo "== Opening a dirty image read/write should repair it =="
+
+IMGOPTS="compat=1.1,lazy_refcounts=on"
+_make_test_img $size
+
+old_ulimit=$(ulimit -c)
+ulimit -c 0 # do not produce a core dump on abort(3)
+$QEMU_IO -c "write -P 0x5a 0 512" -c "abort" $TEST_IMG | _filter_qemu_io
+ulimit -c "$old_ulimit"
+
+# The dirty bit must be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+
+$QEMU_IO -c "write 0 512" $TEST_IMG | _filter_qemu_io
+
+# The dirty bit must not be set
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+
+echo
+echo "== Creating an image file with lazy_refcounts=off =="
+
+IMGOPTS="compat=1.1,lazy_refcounts=off"
+_make_test_img $size
+
+old_ulimit=$(ulimit -c)
+ulimit -c 0 # do not produce a core dump on abort(3)
+$QEMU_IO -c "write -P 0x5a 0 512" -c "abort" $TEST_IMG | _filter_qemu_io
+ulimit -c "$old_ulimit"
+
+# The dirty bit must not be set since lazy_refcounts=off
+./qcow2.py $TEST_IMG dump-header | grep incompatible_features
+_check_test_img
+
+# success, all done
+echo "*** done"
+rm -f $seq.full
+status=0
+
diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out
new file mode 100644
index 0000000..8ad570d
--- /dev/null
+++ b/tests/qemu-iotests/039.out
@@ -0,0 +1,53 @@
+QA output created by 039
+
+== Checking that image is clean on shutdown ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x0
+No errors were found on the image.
+
+== Creating a dirty image file ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x1
+ERROR OFLAG_COPIED: offset=8000000000050000 refcount=0
+ERROR cluster 5 refcount=0 reference=1
+
+2 errors were found on the image.
+Data may be corrupted, or further writes to the image may corrupt it.
+
+== Read-only access must still work ==
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x1
+
+== Repairing the image file must succeed ==
+ERROR OFLAG_COPIED: offset=8000000000050000 refcount=0
+Repairing cluster 5 refcount=0 reference=1
+No errors were found on the image.
+incompatible_features 0x0
+
+== Data should still be accessible after repair ==
+read 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== Opening a dirty image read/write should repair it ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x1
+ERROR OFLAG_COPIED: offset=8000000000050000 refcount=0
+Repairing cluster 5 refcount=0 reference=1
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x0
+
+== Creating an image file with lazy_refcounts=off ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+incompatible_features 0x0
+No errors were found on the image.
+*** done
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 7a2c92b..ebb5ca4 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -45,3 +45,4 @@
036 rw auto quick
037 rw auto backing
038 rw auto backing
+039 rw auto
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (9 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 10/12] qemu-iotests: add 039 qcow2 lazy refcounts test Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-06 21:54 ` Eric Blake
2012-08-06 20:44 ` [Qemu-devel] [PATCH 12/12] qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function Kevin Wolf
` (2 subsequent siblings)
13 siblings, 1 reply; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
qemu-iotests already filters out image creation options that may be
present or not in order to get the same output in both cases. However,
often it only considers the default value of the option. Cover all valid
values instead so that ./check -o name=value can be used successfull for
all of them.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/039.out | 6 +++---
tests/qemu-iotests/common.rc | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/qemu-iotests/039.out b/tests/qemu-iotests/039.out
index 8ad570d..155a05e 100644
--- a/tests/qemu-iotests/039.out
+++ b/tests/qemu-iotests/039.out
@@ -1,14 +1,14 @@
QA output created by 039
== Checking that image is clean on shutdown ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
incompatible_features 0x0
No errors were found on the image.
== Creating a dirty image file ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
incompatible_features 0x1
@@ -34,7 +34,7 @@ read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== Opening a dirty image read/write should repair it ==
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 lazy_refcounts=on
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
incompatible_features 0x1
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index cc4e39b..7782808 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -110,11 +110,11 @@ _make_test_img()
sed -e "s#$IMGFMT#IMGFMT#g" | \
sed -e "s# encryption=off##g" | \
sed -e "s# cluster_size=[0-9]\\+##g" | \
- sed -e "s# table_size=0##g" | \
+ sed -e "s# table_size=[0-9]\\+##g" | \
sed -e "s# compat='[^']*'##g" | \
- sed -e "s# compat6=off##g" | \
- sed -e "s# static=off##g" | \
- sed -e "s# lazy_refcounts=off##g"
+ sed -e "s# compat6=\\(on\\|off\\)##g" | \
+ sed -e "s# static=\\(on\\|off\\)##g" | \
+ sed -e "s# lazy_refcounts=\\(on\\|off\\)##g"
}
_cleanup_test_img()
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Qemu-devel] [PATCH 12/12] qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (10 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options Kevin Wolf
@ 2012-08-06 20:44 ` Kevin Wolf
2012-08-07 8:28 ` [Qemu-devel] [PULL 00/12] Block patches Paolo Bonzini
2012-08-07 15:36 ` Anthony Liguori
13 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-06 20:44 UTC (permalink / raw)
To: anthony; +Cc: kwolf, qemu-devel
From: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qemu-img.c | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index b866f80..94a31ad 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1567,14 +1567,19 @@ static int img_resize(int argc, char **argv)
const char *filename, *fmt, *size;
int64_t n, total_size;
BlockDriverState *bs = NULL;
- QEMUOptionParameter *param;
- QEMUOptionParameter resize_options[] = {
- {
- .name = BLOCK_OPT_SIZE,
- .type = OPT_SIZE,
- .help = "Virtual disk size"
+ QemuOpts *param;
+ static QemuOptsList resize_options = {
+ .name = "resize_options",
+ .head = QTAILQ_HEAD_INITIALIZER(resize_options.head),
+ .desc = {
+ {
+ .name = BLOCK_OPT_SIZE,
+ .type = QEMU_OPT_SIZE,
+ .help = "Virtual disk size"
+ }, {
+ /* end of list */
+ }
},
- { NULL }
};
/* Remove size from argv manually so that negative numbers are not treated
@@ -1624,14 +1629,15 @@ static int img_resize(int argc, char **argv)
}
/* Parse size */
- param = parse_option_parameters("", resize_options, NULL);
- if (set_option_parameter(param, BLOCK_OPT_SIZE, size)) {
+ param = qemu_opts_create(&resize_options, NULL, 0, NULL);
+ if (qemu_opt_set(param, BLOCK_OPT_SIZE, size)) {
/* Error message already printed when size parsing fails */
ret = -1;
+ qemu_opts_del(param);
goto out;
}
- n = get_option_parameter(param, BLOCK_OPT_SIZE)->value.n;
- free_option_parameters(param);
+ n = qemu_opt_get_size(param, BLOCK_OPT_SIZE, 0);
+ qemu_opts_del(param);
bs = bdrv_new_open(filename, fmt, BDRV_O_FLAGS | BDRV_O_RDWR);
if (!bs) {
--
1.7.6.5
^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options
2012-08-06 20:44 ` [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options Kevin Wolf
@ 2012-08-06 21:54 ` Eric Blake
2012-08-06 21:57 ` Eric Blake
0 siblings, 1 reply; 41+ messages in thread
From: Eric Blake @ 2012-08-06 21:54 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel, anthony
[-- Attachment #1: Type: text/plain, Size: 1976 bytes --]
On 08/06/2012 02:44 PM, Kevin Wolf wrote:
> qemu-iotests already filters out image creation options that may be
> present or not in order to get the same output in both cases. However,
> often it only considers the default value of the option. Cover all valid
> values instead so that ./check -o name=value can be used successfull for
> all of them.
>
> +++ b/tests/qemu-iotests/common.rc
> @@ -110,11 +110,11 @@ _make_test_img()
> sed -e "s#$IMGFMT#IMGFMT#g" | \
> sed -e "s# encryption=off##g" | \
> sed -e "s# cluster_size=[0-9]\\+##g" | \
> - sed -e "s# table_size=0##g" | \
> + sed -e "s# table_size=[0-9]\\+##g" | \
Technically, use of \+ in a sed expression is undefined by POSIX.
> sed -e "s# compat='[^']*'##g" | \
> - sed -e "s# compat6=off##g" | \
> - sed -e "s# static=off##g" | \
> - sed -e "s# lazy_refcounts=off##g"
> + sed -e "s# compat6=\\(on\\|off\\)##g" | \
Likewise for use of \(, \|, and \).
If you were worried about strict POSIX compliance, you could rewrite
these to use similar expressions that are limited to portable sed:
sed -e "s# table_size=[0-9][0-9]*##g"
sed -e "s# compat6=o[nf]*##g"
(and if the difference of wiping unlikely things like compat6=onfnfn
really matters to one of our tests, then we've got some UI to improve.)
But since this is the testsuite, which will run primarily on systems
with GNU sed where all four extensions are commonly present for
selecting features of ERE on top of the POSIX-mandated BRE syntax used
by sed, and where encountering a non-GNU sed that doesn't have the same
extensions will probably result in a noisy testsuite failure rather than
silent disk corruption, I'm okay overlooking this non-portable aspect
for now. (Not to mention that you're not the first offender, seeing
that cluster_size earlier in the context also used \+.)
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options
2012-08-06 21:54 ` Eric Blake
@ 2012-08-06 21:57 ` Eric Blake
2012-08-09 11:13 ` Kevin Wolf
0 siblings, 1 reply; 41+ messages in thread
From: Eric Blake @ 2012-08-06 21:57 UTC (permalink / raw)
To: Eric Blake; +Cc: Kevin Wolf, qemu-devel, anthony
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
On 08/06/2012 03:54 PM, Eric Blake wrote:
> On 08/06/2012 02:44 PM, Kevin Wolf wrote:
>> qemu-iotests already filters out image creation options that may be
>> present or not in order to get the same output in both cases. However,
>> often it only considers the default value of the option. Cover all valid
>> values instead so that ./check -o name=value can be used successfull for
>> all of them.
>>
>
>> +++ b/tests/qemu-iotests/common.rc
>> @@ -110,11 +110,11 @@ _make_test_img()
>> sed -e "s#$IMGFMT#IMGFMT#g" | \
>> sed -e "s# encryption=off##g" | \
>> sed -e "s# cluster_size=[0-9]\\+##g" | \
>> - sed -e "s# table_size=0##g" | \
>> + sed -e "s# table_size=[0-9]\\+##g" | \
>
> Technically, use of \+ in a sed expression is undefined by POSIX.
Oh, one other thing. This wastes a lot of processes by making a huge
pipeline. Why not just do it with one sed process instead?
sed -e "s# encryption=off##g" \
-e "s# cluster_size=..." \
-e ...
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (11 preceding siblings ...)
2012-08-06 20:44 ` [Qemu-devel] [PATCH 12/12] qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function Kevin Wolf
@ 2012-08-07 8:28 ` Paolo Bonzini
2012-08-07 15:36 ` Anthony Liguori
13 siblings, 0 replies; 41+ messages in thread
From: Paolo Bonzini @ 2012-08-07 8:28 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel, anthony
Il 06/08/2012 22:44, Kevin Wolf ha scritto:
> The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:
>
> virtio: fix vhost handling (2012-08-06 14:01:44 -0500)
I see the virtio caching patches are not included, should I resubmit
them together with the change of the default from writethrough to writeback?
Paolo
> are available in the git repository at:
> http://repo.or.cz/r/qemu/kevin.git for-anthony
>
> Dong Xu Wang (1):
> qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
>
> Kevin Wolf (1):
> qemu-iotests: Be more flexible with image creation options
>
> Markus Armbruster (1):
> ide scsi: Mess with geometry only for hard disk devices
>
> Paolo Bonzini (1):
> qapi: generalize documentation of streaming commands
>
> Stefan Hajnoczi (8):
> qemu-iotests: add qed.py image manipulation utility
> docs: add dirty bit to qcow2 specification
> qcow2: introduce dirty bit
> docs: add lazy refcounts bit to qcow2 specification
> qemu-iotests: ignore qemu-img create lazy_refcounts output
> qcow2: implement lazy refcounts
> qemu-io: add "abort" command to simulate program crash
> qemu-iotests: add 039 qcow2 lazy refcounts test
>
> block/qcow2-cluster.c | 5 +-
> block/qcow2.c | 123 +++++++++++++++++++++--
> block/qcow2.h | 21 ++++
> block_int.h | 26 +++--
> docs/specs/qcow2.txt | 14 ++-
> hmp-commands.hx | 2 +-
> hw/ide/qdev.c | 3 +-
> hw/scsi-disk.c | 3 +-
> qapi-schema.json | 17 ++--
> qemu-img.c | 28 +++--
> qemu-io.c | 12 ++
> tests/qemu-iotests/031.out | 20 ++--
> tests/qemu-iotests/036.out | 4 +-
> tests/qemu-iotests/039 | 136 ++++++++++++++++++++++++
> tests/qemu-iotests/039.out | 53 ++++++++++
> tests/qemu-iotests/common.rc | 7 +-
> tests/qemu-iotests/group | 1 +
> tests/qemu-iotests/qed.py | 235 ++++++++++++++++++++++++++++++++++++++++++
> 18 files changed, 650 insertions(+), 60 deletions(-)
> create mode 100755 tests/qemu-iotests/039
> create mode 100644 tests/qemu-iotests/039.out
> create mode 100755 tests/qemu-iotests/qed.py
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
` (12 preceding siblings ...)
2012-08-07 8:28 ` [Qemu-devel] [PULL 00/12] Block patches Paolo Bonzini
@ 2012-08-07 15:36 ` Anthony Liguori
13 siblings, 0 replies; 41+ messages in thread
From: Anthony Liguori @ 2012-08-07 15:36 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
Kevin Wolf <kwolf@redhat.com> writes:
> The following changes since commit 26b9b5fe17cc1b6be2e8bf8b9d16094f420bb8ad:
>
> virtio: fix vhost handling (2012-08-06 14:01:44 -0500)
>
> are available in the git repository at:
> http://repo.or.cz/r/qemu/kevin.git for-anthony
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Dong Xu Wang (1):
> qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function
>
> Kevin Wolf (1):
> qemu-iotests: Be more flexible with image creation options
>
> Markus Armbruster (1):
> ide scsi: Mess with geometry only for hard disk devices
>
> Paolo Bonzini (1):
> qapi: generalize documentation of streaming commands
>
> Stefan Hajnoczi (8):
> qemu-iotests: add qed.py image manipulation utility
> docs: add dirty bit to qcow2 specification
> qcow2: introduce dirty bit
> docs: add lazy refcounts bit to qcow2 specification
> qemu-iotests: ignore qemu-img create lazy_refcounts output
> qcow2: implement lazy refcounts
> qemu-io: add "abort" command to simulate program crash
> qemu-iotests: add 039 qcow2 lazy refcounts test
>
> block/qcow2-cluster.c | 5 +-
> block/qcow2.c | 123 +++++++++++++++++++++--
> block/qcow2.h | 21 ++++
> block_int.h | 26 +++--
> docs/specs/qcow2.txt | 14 ++-
> hmp-commands.hx | 2 +-
> hw/ide/qdev.c | 3 +-
> hw/scsi-disk.c | 3 +-
> qapi-schema.json | 17 ++--
> qemu-img.c | 28 +++--
> qemu-io.c | 12 ++
> tests/qemu-iotests/031.out | 20 ++--
> tests/qemu-iotests/036.out | 4 +-
> tests/qemu-iotests/039 | 136 ++++++++++++++++++++++++
> tests/qemu-iotests/039.out | 53 ++++++++++
> tests/qemu-iotests/common.rc | 7 +-
> tests/qemu-iotests/group | 1 +
> tests/qemu-iotests/qed.py | 235 ++++++++++++++++++++++++++++++++++++++++++
> 18 files changed, 650 insertions(+), 60 deletions(-)
> create mode 100755 tests/qemu-iotests/039
> create mode 100644 tests/qemu-iotests/039.out
> create mode 100755 tests/qemu-iotests/qed.py
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options
2012-08-06 21:57 ` Eric Blake
@ 2012-08-09 11:13 ` Kevin Wolf
0 siblings, 0 replies; 41+ messages in thread
From: Kevin Wolf @ 2012-08-09 11:13 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel, anthony
Am 06.08.2012 23:57, schrieb Eric Blake:
> On 08/06/2012 03:54 PM, Eric Blake wrote:
>> On 08/06/2012 02:44 PM, Kevin Wolf wrote:
>>> qemu-iotests already filters out image creation options that may be
>>> present or not in order to get the same output in both cases. However,
>>> often it only considers the default value of the option. Cover all valid
>>> values instead so that ./check -o name=value can be used successfull for
>>> all of them.
>>>
>>
>>> +++ b/tests/qemu-iotests/common.rc
>>> @@ -110,11 +110,11 @@ _make_test_img()
>>> sed -e "s#$IMGFMT#IMGFMT#g" | \
>>> sed -e "s# encryption=off##g" | \
>>> sed -e "s# cluster_size=[0-9]\\+##g" | \
>>> - sed -e "s# table_size=0##g" | \
>>> + sed -e "s# table_size=[0-9]\\+##g" | \
>>
>> Technically, use of \+ in a sed expression is undefined by POSIX.
>
> Oh, one other thing. This wastes a lot of processes by making a huge
> pipeline. Why not just do it with one sed process instead?
>
> sed -e "s# encryption=off##g" \
> -e "s# cluster_size=..." \
> -e ...
Makes sense, I'll send a patch.
Kevin
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2015-01-23 18:20 Kevin Wolf
2015-01-26 10:16 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Kevin Wolf @ 2015-01-23 18:20 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
The following changes since commit c6441452b50c44fdbb362b239ce623f77cf3cd51:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150122-1' into staging (2015-01-22 18:57:36 +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 bc63781ca350cad4c9eb142ce8f55bfaded4276e:
Merge remote-tracking branch 'mreitz/block' into queue-block (2015-01-23 18:51:47 +0100)
----------------------------------------------------------------
Block patches for 2.3
----------------------------------------------------------------
Fam Zheng (2):
virtio-blk: Pass req to virtio_blk_handle_scsi_req
virtio-blk: Use blk_aio_ioctl
Jeff Cody (7):
block: vmdk - make ret variable usage clear
block: vmdk - move string allocations from stack to the heap
block: qapi - move string allocation from stack to the heap
block: remove unused variable in bdrv_commit
block: mirror - change string allocation to 2-bytes
block: update string sizes for filename,backing_file,exact_filename
block: vhdx - force FileOffsetMB field to '0' for certain block states
Kevin Wolf (1):
Merge remote-tracking branch 'mreitz/block' into queue-block
Max Reitz (3):
qcow2: Add two more unalignment checks
iotests: Add tests for more corruption cases
iotests: Lower 064's memory usage
block.c | 3 -
block/mirror.c | 3 +-
block/qapi.c | 7 ++-
block/qcow.c | 2 +-
block/qcow2-cluster.c | 21 +++++++
block/qcow2.c | 3 +-
block/vhdx.c | 13 +++-
block/vmdk.c | 51 +++++++++-------
block/vvfat.c | 4 +-
hw/block/virtio-blk.c | 134 ++++++++++++++++++++++++++---------------
include/block/block_int.h | 8 +--
include/hw/virtio/virtio-blk.h | 3 -
qemu-img.c | 4 +-
tests/qemu-iotests/060 | 15 +++++
tests/qemu-iotests/060.out | 13 ++++
tests/qemu-iotests/064 | 19 +++++-
tests/qemu-iotests/064.out | 34 +++++++++--
17 files changed, 239 insertions(+), 98 deletions(-)
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2015-01-23 18:20 Kevin Wolf
@ 2015-01-26 10:16 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2015-01-26 10:16 UTC (permalink / raw)
To: Kevin Wolf; +Cc: QEMU Developers
On 23 January 2015 at 18:20, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit c6441452b50c44fdbb362b239ce623f77cf3cd51:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150122-1' into staging (2015-01-22 18:57:36 +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 bc63781ca350cad4c9eb142ce8f55bfaded4276e:
>
> Merge remote-tracking branch 'mreitz/block' into queue-block (2015-01-23 18:51:47 +0100)
>
> ----------------------------------------------------------------
>
> Block patches for 2.3
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2015-10-29 18:09 Stefan Hajnoczi
2015-10-30 9:40 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Hajnoczi @ 2015-10-29 18:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +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 37a639a7fbc5c6b065c80e7e2de78d22af735496:
block: Consider all child nodes in bdrv_requests_pending() (2015-10-29 17:59:27 +0000)
----------------------------------------------------------------
----------------------------------------------------------------
Cornelia Huck (3):
s390x: include HW_COMPAT_* props
ppc/spapr: add 2.4 compat props
virtio-blk: switch off scsi-passthrough by default
Dr. David Alan Gilbert (1):
gdb command: qemu handlers
Kevin Wolf (1):
block: Consider all child nodes in bdrv_requests_pending()
Paolo Bonzini (3):
qemu-gdb: allow using glibc_pointer_guard() on core dumps
qemu-gdb: extract parts of "qemu coroutine" implementation
qemu-gdb: add $qemu_coroutine_sp and $qemu_coroutine_pc
Pavel Butsykin (1):
virtio: sync the dataplane vring state to the virtqueue before
virtio_save
Sai Pavan Boddu (3):
sd.h: Move sd.h to include/hw/sd/
sdhci: Split sdhci.h for public and internal device usage
target-arm: xlnx-zynqmp: Add sdhci support.
block/io.c | 13 +-
hw/arm/xlnx-zynqmp.c | 28 ++++
hw/block/virtio-blk.c | 7 +-
hw/ppc/spapr.c | 9 ++
hw/s390x/s390-virtio-ccw.c | 2 +
hw/scsi/virtio-scsi.c | 5 +
hw/sd/milkymist-memcard.c | 2 +-
hw/sd/omap_mmc.c | 2 +-
hw/sd/pl181.c | 2 +-
hw/sd/pxa2xx_mmci.c | 2 +-
hw/sd/sd.c | 2 +-
hw/sd/sdhci-internal.h | 232 +++++++++++++++++++++++++++++++++
hw/sd/sdhci.c | 3 +-
hw/sd/sdhci.h | 297 -------------------------------------------
hw/sd/ssi-sd.c | 2 +-
include/hw/arm/xlnx-zynqmp.h | 3 +
include/hw/compat.h | 6 +-
include/hw/sd.h | 80 ------------
include/hw/sd/sd.h | 80 ++++++++++++
include/hw/sd/sdhci.h | 94 ++++++++++++++
scripts/qemu-gdb.py | 6 +-
scripts/qemugdb/aio.py | 58 +++++++++
scripts/qemugdb/coroutine.py | 90 ++++++++-----
23 files changed, 601 insertions(+), 424 deletions(-)
create mode 100644 hw/sd/sdhci-internal.h
delete mode 100644 hw/sd/sdhci.h
delete mode 100644 include/hw/sd.h
create mode 100644 include/hw/sd/sd.h
create mode 100644 include/hw/sd/sdhci.h
create mode 100644 scripts/qemugdb/aio.py
--
2.4.3
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2015-10-29 18:09 Stefan Hajnoczi
@ 2015-10-30 9:40 ` Peter Maydell
2015-10-30 14:19 ` Markus Armbruster
0 siblings, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2015-10-30 9:40 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers
On 29 October 2015 at 18:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:
>
> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-29 09:49:52 +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 37a639a7fbc5c6b065c80e7e2de78d22af735496:
>
> block: Consider all child nodes in bdrv_requests_pending() (2015-10-29 17:59:27 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
I get an error on 64-bit ARM running the ivshmem tests:
TEST: tests/ivshmem-test... (pid=22948)
/i386/ivshmem/single: OK
/i386/ivshmem/pair: OK
/i386/ivshmem/server: **
ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
assertion failed (ret != 0): (0 != 0)
FAIL
GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
(pid=23709)
/i386/ivshmem/hotplug: OK
/i386/ivshmem/memdev: OK
FAIL: tests/ivshmem-test
Nothing obviously related in this patchset that would cause that,
though...
thanks
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2015-10-30 9:40 ` Peter Maydell
@ 2015-10-30 14:19 ` Markus Armbruster
2015-10-30 17:37 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Markus Armbruster @ 2015-10-30 14:19 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Stefan Hajnoczi
Peter Maydell <peter.maydell@linaro.org> writes:
> On 29 October 2015 at 18:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>> The following changes since commit 7bc8e0c967a4ef77657174d28af775691e18b4ce:
>>
>> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into
>> staging (2015-10-29 09:49:52 +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 37a639a7fbc5c6b065c80e7e2de78d22af735496:
>>
>> block: Consider all child nodes in bdrv_requests_pending()
>> (2015-10-29 17:59:27 +0000)
>>
>> ----------------------------------------------------------------
>>
>> ----------------------------------------------------------------
>
> I get an error on 64-bit ARM running the ivshmem tests:
>
> TEST: tests/ivshmem-test... (pid=22948)
> /i386/ivshmem/single: OK
> /i386/ivshmem/pair: OK
> /i386/ivshmem/server: **
> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
> assertion failed (ret != 0): (0 != 0)
> FAIL
> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
> (pid=23709)
> /i386/ivshmem/hotplug: OK
> /i386/ivshmem/memdev: OK
> FAIL: tests/ivshmem-test
>
> Nothing obviously related in this patchset that would cause that,
> though...
I've seen this, too, but throwing away my build tree made it go away, so
I blamed "make choking on stale build tree" syndrome. Perhaps it's an
intermittent ivshmem bug instead.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2015-10-30 14:19 ` Markus Armbruster
@ 2015-10-30 17:37 ` Peter Maydell
2015-10-30 21:59 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2015-10-30 17:37 UTC (permalink / raw)
To: Markus Armbruster; +Cc: QEMU Developers, Stefan Hajnoczi
On 30 October 2015 at 14:19, Markus Armbruster <armbru@redhat.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>> I get an error on 64-bit ARM running the ivshmem tests:
>>
>> TEST: tests/ivshmem-test... (pid=22948)
>> /i386/ivshmem/single: OK
>> /i386/ivshmem/pair: OK
>> /i386/ivshmem/server: **
>> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
>> assertion failed (ret != 0): (0 != 0)
>> FAIL
>> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
>> (pid=23709)
>> /i386/ivshmem/hotplug: OK
>> /i386/ivshmem/memdev: OK
>> FAIL: tests/ivshmem-test
>>
>> Nothing obviously related in this patchset that would cause that,
>> though...
>
> I've seen this, too, but throwing away my build tree made it go away, so
> I blamed "make choking on stale build tree" syndrome. Perhaps it's an
> intermittent ivshmem bug instead.
I didn't do a make clean before successfully applying other pulls,
so I think my money is on "intermittent ivshmem issue". I'll have
another go with this one once I've finished the rest of the queue...
thanks
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2015-10-30 17:37 ` Peter Maydell
@ 2015-10-30 21:59 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2015-10-30 21:59 UTC (permalink / raw)
To: Markus Armbruster; +Cc: QEMU Developers, Stefan Hajnoczi
On 30 October 2015 at 17:37, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 30 October 2015 at 14:19, Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>> I get an error on 64-bit ARM running the ivshmem tests:
>>>
>>> TEST: tests/ivshmem-test... (pid=22948)
>>> /i386/ivshmem/single: OK
>>> /i386/ivshmem/pair: OK
>>> /i386/ivshmem/server: **
>>> ERROR:/home/petmay01/qemu/tests/ivshmem-test.c:345:test_ivshmem_server:
>>> assertion failed (ret != 0): (0 != 0)
>>> FAIL
>>> GTester: last random seed: R02S51e68a84790014e86af5b8b7264d3e39
>>> (pid=23709)
>>> /i386/ivshmem/hotplug: OK
>>> /i386/ivshmem/memdev: OK
>>> FAIL: tests/ivshmem-test
>>>
>>> Nothing obviously related in this patchset that would cause that,
>>> though...
>>
>> I've seen this, too, but throwing away my build tree made it go away, so
>> I blamed "make choking on stale build tree" syndrome. Perhaps it's an
>> intermittent ivshmem bug instead.
>
> I didn't do a make clean before successfully applying other pulls,
> so I think my money is on "intermittent ivshmem issue". I'll have
> another go with this one once I've finished the rest of the queue...
Second try did indeed work fine, so I've applied it.
thanks
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2016-02-29 20:08 Jeff Cody
2016-03-01 10:34 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Jeff Cody @ 2016-02-29 20:08 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, jcody, famz, qemu-devel
The following changes since commit 071608b519adf62bc29c914343a21c5407ab1ac9:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160229-1' into staging (2016-02-29 12:24:26 +0000)
are available in the git repository at:
git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to cc199b16cf4cb9279aca73f5f5dce2cc337b9079:
iotests/124: Add cluster_size mismatch test (2016-02-29 14:55:14 -0500)
----------------------------------------------------------------
Block patches
----------------------------------------------------------------
Daniel P. Berrange (3):
rbd: add support for getting password from QCryptoSecret object
curl: add support for HTTP authentication parameters
iscsi: add support for getting CHAP password via QCryptoSecret API
Fam Zheng (2):
mirror: Rewrite mirror_iteration
mirror: Add mirror_wait_for_io
John Snow (3):
block/backup: make backup cluster size configurable
block/backup: avoid copying less than full target clusters
iotests/124: Add cluster_size mismatch test
Max Reitz (2):
vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries()
vhdx: Simplify vhdx_set_shift_bits()
Peter Lieven (1):
block/nfs: add support for setting debug level
Vasiliy Tolstov (1):
sheepdog: allow to delete snapshot
block/backup.c | 87 +++++++----
block/curl.c | 66 +++++++++
block/iscsi.c | 24 ++-
block/mirror.c | 353 +++++++++++++++++++++++++++------------------
block/nfs.c | 12 ++
block/rbd.c | 47 ++++++
block/sheepdog.c | 125 +++++++++++++++-
block/vhdx.c | 18 +--
tests/qemu-iotests/109.out | 80 +++++-----
tests/qemu-iotests/124 | 58 +++++++-
tests/qemu-iotests/124.out | 4 +-
trace-events | 1 -
12 files changed, 641 insertions(+), 234 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2016-02-29 20:08 Jeff Cody
@ 2016-03-01 10:34 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2016-03-01 10:34 UTC (permalink / raw)
To: Jeff Cody; +Cc: Fam Zheng, QEMU Developers, Qemu-block
On 29 February 2016 at 20:08, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit 071608b519adf62bc29c914343a21c5407ab1ac9:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160229-1' into staging (2016-02-29 12:24:26 +0000)
>
> are available in the git repository at:
>
>
> git@github.com:codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to cc199b16cf4cb9279aca73f5f5dce2cc337b9079:
>
> iotests/124: Add cluster_size mismatch test (2016-02-29 14:55:14 -0500)
>
> ----------------------------------------------------------------
> Block patches
> ----------------------------------------------------------------
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2016-06-07 14:26 Stefan Hajnoczi
2016-06-07 15:34 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Hajnoczi @ 2016-06-07 14:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi
The following changes since commit 76462405809d29bab65a3699686998ba124ab942:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160606-1' into staging (2016-06-06 17:02:42 +0100)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 8860eabdee32f78d9a34273a340b8f74476bc9a0:
throttle: refuse iops-size without iops-total/read/write (2016-06-07 14:40:51 +0100)
----------------------------------------------------------------
----------------------------------------------------------------
Changlong Xie (1):
iostatus: fix comments for block_job_iostatus_reset
Eric Blake (1):
block: Move BlockRequest type to io.c
Fam Zheng (5):
blockdev-backup: Use bdrv_lookup_bs on target
blockdev-backup: Don't move target AioContext if it's attached
virtio-blk: Remove op blocker for dataplane
virtio-scsi: Remove op blocker for dataplane
block: Drop bdrv_ioctl_bh_cb
Kevin Wolf (1):
block/io: Remove unused bdrv_aio_write_zeroes()
Peter Lieven (1):
block/io: optimize bdrv_co_pwritev for small requests
Stefan Hajnoczi (3):
tests: avoid coroutine pool test crash
virtio: drop duplicate virtio_queue_get_id() function
throttle: refuse iops-size without iops-total/read/write
block/io.c | 60 +++++++++++++++++++-------------------
blockdev.c | 23 ++++++++-------
hw/block/dataplane/virtio-blk.c | 63 ----------------------------------------
hw/scsi/virtio-scsi.c | 64 +----------------------------------------
hw/virtio/virtio.c | 7 -----
include/block/block.h | 24 ----------------
include/block/blockjob.h | 2 +-
include/hw/virtio/virtio-scsi.h | 11 -------
include/hw/virtio/virtio.h | 1 -
tests/qemu-iotests/077 | 12 +-------
tests/qemu-iotests/077.out | 26 -----------------
tests/test-coroutine.c | 10 ++++++-
tests/test-throttle.c | 10 +++++++
trace-events | 1 -
util/throttle.c | 8 ++++++
15 files changed, 74 insertions(+), 248 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2016-06-07 14:26 Stefan Hajnoczi
@ 2016-06-07 15:34 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2016-06-07 15:34 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: QEMU Developers
On 7 June 2016 at 15:26, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 76462405809d29bab65a3699686998ba124ab942:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160606-1' into staging (2016-06-06 17:02:42 +0100)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 8860eabdee32f78d9a34273a340b8f74476bc9a0:
>
> throttle: refuse iops-size without iops-total/read/write (2016-06-07 14:40:51 +0100)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2017-04-21 13:46 Jeff Cody
2017-04-21 16:55 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Jeff Cody @ 2017-04-21 13:46 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel
The following changes since commit bfec359afba088aaacc7d316f43302f28c6e642a:
Merge remote-tracking branch 'remotes/armbru/tags/pull-qdev-2017-04-21' into staging (2017-04-21 11:42:03 +0100)
are available in the git repository at:
git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to 1507631e438930bc07f776f303af127a9cdb4d41:
qemu-iotests: _cleanup_qemu must be called on exit (2017-04-21 08:32:44 -0400)
----------------------------------------------------------------
Block patches for 2.10
----------------------------------------------------------------
Ashish Mittal (2):
block/vxhs.c: Add support for a new block device type called "vxhs"
block/vxhs.c: Add qemu-iotests for new block device type "vxhs"
Jeff Cody (10):
qemu-iotests: exclude vxhs from image creation via protocol
block: add bdrv_set_read_only() helper function
block: do not set BDS read_only if copy_on_read enabled
block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only
block: code movement
block: introduce bdrv_can_set_read_only()
block: use bdrv_can_set_read_only() during reopen
block/rbd - update variable names to more apt names
block/rbd: Add support for reopen()
qemu-iotests: _cleanup_qemu must be called on exit
block.c | 56 +++-
block/Makefile.objs | 2 +
block/bochs.c | 5 +-
block/cloop.c | 5 +-
block/dmg.c | 6 +-
block/rbd.c | 65 +++--
block/trace-events | 17 ++
block/vvfat.c | 19 +-
block/vxhs.c | 575 +++++++++++++++++++++++++++++++++++++++
configure | 39 +++
include/block/block.h | 2 +
qapi/block-core.json | 23 +-
tests/qemu-iotests/017 | 1 +
tests/qemu-iotests/020 | 1 +
tests/qemu-iotests/028 | 1 +
tests/qemu-iotests/029 | 1 +
tests/qemu-iotests/073 | 1 +
tests/qemu-iotests/094 | 11 +-
tests/qemu-iotests/102 | 5 +-
tests/qemu-iotests/109 | 1 +
tests/qemu-iotests/114 | 1 +
tests/qemu-iotests/117 | 1 +
tests/qemu-iotests/130 | 2 +
tests/qemu-iotests/134 | 1 +
tests/qemu-iotests/140 | 1 +
tests/qemu-iotests/141 | 1 +
tests/qemu-iotests/143 | 1 +
tests/qemu-iotests/156 | 2 +
tests/qemu-iotests/158 | 1 +
tests/qemu-iotests/common | 6 +
tests/qemu-iotests/common.config | 13 +
tests/qemu-iotests/common.filter | 1 +
tests/qemu-iotests/common.rc | 19 ++
33 files changed, 844 insertions(+), 42 deletions(-)
create mode 100644 block/vxhs.c
--
2.9.3
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2017-04-21 13:46 Jeff Cody
@ 2017-04-21 16:55 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2017-04-21 16:55 UTC (permalink / raw)
To: Jeff Cody; +Cc: Qemu-block, QEMU Developers
On 21 April 2017 at 14:46, Jeff Cody <jcody@redhat.com> wrote:
> The following changes since commit bfec359afba088aaacc7d316f43302f28c6e642a:
>
> Merge remote-tracking branch 'remotes/armbru/tags/pull-qdev-2017-04-21' into staging (2017-04-21 11:42:03 +0100)
>
> are available in the git repository at:
>
> git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
>
> for you to fetch changes up to 1507631e438930bc07f776f303af127a9cdb4d41:
>
> qemu-iotests: _cleanup_qemu must be called on exit (2017-04-21 08:32:44 -0400)
>
> ----------------------------------------------------------------
>
> Block patches for 2.10
>
Hi, I'm afraid this runs into format string compile issues:
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1465:42:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
, guid, iodir, size, off, acb, ret, err);
^~~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1465:48:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
, guid, iodir, size, off, acb, ret, err);
^~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1493:41:
error: format specifies type 'unsigned long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
, vdisk_guid, vdisk_size);
^~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
^
In file included from block/trace.c:4:
/Users/pm215/src/qemu-for-merges/build/all/block/trace.h:1507:34:
error: format specifies type 'long' but the argument has type
'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
, acb, ret);
^~~
/Users/pm215/src/qemu-for-merges/include/qemu/log.h:94:30: note:
expanded from macro 'qemu_log_mask'
qemu_log(FMT, ## __VA_ARGS__); \
^
4 errors generated.
Those are the OSX errors, but the compile also fails for 32-bit
hosts (including w32).
thanks
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2017-05-26 19:23 Jeff Cody
0 siblings, 0 replies; 41+ messages in thread
From: Jeff Cody @ 2017-05-26 19:23 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, jcody, qemu-devel, stefanha
The following changes since commit 9964e96dc9999cf7f7c936ee854a795415d19b60:
Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100)
are available in the git repository at:
git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request
for you to fetch changes up to 223a23c198787328ae75bc65d84edf5fde33c0b6:
block/gluster: glfs_lseek() workaround (2017-05-24 16:44:46 -0400)
----------------------------------------------------------------
Block patches
----------------------------------------------------------------
Jeff Cody (1):
block/gluster: glfs_lseek() workaround
Paolo Bonzini (11):
blockjob: remove unnecessary check
blockjob: remove iostatus_reset callback
blockjob: introduce block_job_early_fail
blockjob: introduce block_job_pause/resume_all
blockjob: separate monitor and blockjob APIs
blockjob: move iostatus reset inside block_job_user_resume
blockjob: introduce block_job_cancel_async, check iostatus invariants
blockjob: group BlockJob transaction functions together
blockjob: strengthen a bit test-blockjob-txn
blockjob: reorganize block_job_completed_txn_abort
blockjob: use deferred_to_main_loop to indicate the coroutine has
ended
block/backup.c | 2 +-
block/commit.c | 2 +-
block/gluster.c | 18 +-
block/io.c | 19 +-
block/mirror.c | 2 +-
blockdev.c | 1 -
blockjob.c | 750 ++++++++++++++++++++++++-------------------
include/block/blockjob.h | 16 -
include/block/blockjob_int.h | 27 +-
tests/test-blockjob-txn.c | 7 +-
tests/test-blockjob.c | 10 +-
11 files changed, 463 insertions(+), 391 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Qemu-devel] [PULL 00/12] Block patches
@ 2019-08-27 20:16 Stefan Hajnoczi
2019-09-03 10:05 ` Peter Maydell
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Hajnoczi @ 2019-08-27 20:16 UTC (permalink / raw)
To: qemu-devel
Cc: Fam Zheng, Kevin Wolf, qemu-block, Peter Maydell, Max Reitz,
Stefan Hajnoczi, John Snow
The following changes since commit dac03af5d5482ec7ee9c23db467bb7230b33c0d9:
Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging (2019-08-27 10:00:51 +0100)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-pull-request
for you to fetch changes up to 5396234b96a2ac743f48644529771498e036e698:
block/qcow2: implement .bdrv_co_pwritev(_compressed)_part (2019-08-27 14:58:42 +0100)
----------------------------------------------------------------
Pull request
----------------------------------------------------------------
Vladimir Sementsov-Ogievskiy (12):
util/iov: introduce qemu_iovec_init_extended
util/iov: improve qemu_iovec_is_zero
block/io: refactor padding
block: define .*_part io handlers in BlockDriver
block/io: bdrv_co_do_copy_on_readv: use and support qiov_offset
block/io: bdrv_co_do_copy_on_readv: lazy allocation
block/io: bdrv_aligned_preadv: use and support qiov_offset
block/io: bdrv_aligned_pwritev: use and support qiov_offset
block/io: introduce bdrv_co_p{read, write}v_part
block/qcow2: refactor qcow2_co_preadv to use buffer-based io
block/qcow2: implement .bdrv_co_preadv_part
block/qcow2: implement .bdrv_co_pwritev(_compressed)_part
block/qcow2.h | 1 +
include/block/block_int.h | 21 ++
include/qemu/iov.h | 10 +-
block/backup.c | 2 +-
block/io.c | 541 +++++++++++++++++++++++---------------
block/qcow2-cluster.c | 14 +-
block/qcow2.c | 131 +++++----
qemu-img.c | 4 +-
util/iov.c | 153 +++++++++--
9 files changed, 568 insertions(+), 309 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Qemu-devel] [PULL 00/12] Block patches
2019-08-27 20:16 Stefan Hajnoczi
@ 2019-09-03 10:05 ` Peter Maydell
0 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2019-09-03 10:05 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Fam Zheng, Kevin Wolf, Qemu-block, QEMU Developers, Max Reitz,
John Snow
On Tue, 27 Aug 2019 at 21:16, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> The following changes since commit dac03af5d5482ec7ee9c23db467bb7230b33c0d9:
>
> Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging (2019-08-27 10:00:51 +0100)
>
> are available in the Git repository at:
>
> https://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 5396234b96a2ac743f48644529771498e036e698:
>
> block/qcow2: implement .bdrv_co_pwritev(_compressed)_part (2019-08-27 14:58:42 +0100)
>
> ----------------------------------------------------------------
> Pull request
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2019-09-03 10:07 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-06 20:44 [Qemu-devel] [PULL 00/12] Block patches Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 01/12] ide scsi: Mess with geometry only for hard disk devices Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 02/12] qapi: generalize documentation of streaming commands Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 03/12] qemu-iotests: add qed.py image manipulation utility Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 04/12] docs: add dirty bit to qcow2 specification Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 05/12] qcow2: introduce dirty bit Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 06/12] docs: add lazy refcounts bit to qcow2 specification Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 07/12] qemu-iotests: ignore qemu-img create lazy_refcounts output Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 08/12] qcow2: implement lazy refcounts Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 09/12] qemu-io: add "abort" command to simulate program crash Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 10/12] qemu-iotests: add 039 qcow2 lazy refcounts test Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 11/12] qemu-iotests: Be more flexible with image creation options Kevin Wolf
2012-08-06 21:54 ` Eric Blake
2012-08-06 21:57 ` Eric Blake
2012-08-09 11:13 ` Kevin Wolf
2012-08-06 20:44 ` [Qemu-devel] [PATCH 12/12] qemu-img: use QemuOpts instead of QEMUOptionParameter in resize function Kevin Wolf
2012-08-07 8:28 ` [Qemu-devel] [PULL 00/12] Block patches Paolo Bonzini
2012-08-07 15:36 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2019-08-27 20:16 Stefan Hajnoczi
2019-09-03 10:05 ` Peter Maydell
2017-05-26 19:23 Jeff Cody
2017-04-21 13:46 Jeff Cody
2017-04-21 16:55 ` Peter Maydell
2016-06-07 14:26 Stefan Hajnoczi
2016-06-07 15:34 ` Peter Maydell
2016-02-29 20:08 Jeff Cody
2016-03-01 10:34 ` Peter Maydell
2015-10-29 18:09 Stefan Hajnoczi
2015-10-30 9:40 ` Peter Maydell
2015-10-30 14:19 ` Markus Armbruster
2015-10-30 17:37 ` Peter Maydell
2015-10-30 21:59 ` Peter Maydell
2015-01-23 18:20 Kevin Wolf
2015-01-26 10:16 ` Peter Maydell
2012-06-04 11:13 Kevin Wolf
2012-06-07 1:17 ` Anthony Liguori
2012-06-08 9:48 ` Kevin Wolf
2012-06-08 14:07 ` Anthony Liguori
2012-06-08 14:57 ` Kevin Wolf
2011-06-08 13:48 Kevin Wolf
2011-06-09 12:39 ` 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).