[Qemu-block] [PATCH 15/22] qcow2-dirty-bitmap: add autoclear bit

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Add autoclear bit for handling rewriting image by old qemu version. If autoclear bit is not set, but bitmaps extension is found it would not be loaded and warning will be generated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-dirty-bitmap.c | 4

[Qemu-block] [PATCH 03/22] iotests: maintain several vms in test

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
The only problem with it is the same qmp socket name (which is vm._monitor_path) for all vms. And because of this second vm couldn't be lauched (vm.launch() fails because of socket is already in use). This patch adds a number of vm into vm._monitor_path Reviewed-by: John Snow

[Qemu-block] [PATCH v5 00/22] qcow2: persistent dirty bitmaps

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
This series add persistent dirty bitmaps feature to qcow2. Specification is in docs/spec/qcow2.txt v5: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=refs%2Ftags%2Fqcow2-bitmap-v5 Rebased on master. RFC removed. All necessary preparations are included. changes: patches 01-05 was

[Qemu-block] [PATCH 05/22] qapi: add md5 checksum of last dirty bitmap level to query-block

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow Reviewed-by: Eric Blake Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 1 + include/qemu/hbitmap.h | 8 qapi/block-core.json | 5 - util/hbitmap.c | 8

[Qemu-block] [PATCH 22/22] qcow2-dirty-bitmap: add EXTRA_DATA_COMPATIBLE flag

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
If this flag is unset and exta data present the bitmap should be read-only. For now just return error for this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-dirty-bitmap.c | 8 1 file changed, 8 insertions(+) diff --git

[Qemu-block] [PATCH 16/22] qemu: command line option for dirty bitmaps

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
The patch adds the following command line option: -dirty-bitmap [option1=val1][,option2=val2]... Avaliable options are: name The name of the bitmap. Should be unique per 'file'/'node' and per 'for_node'. node The node to load and bind the bitmap. It should be specified as 'id' suboption of one

[Qemu-block] [PATCH 04/22] iotests: add default node-name

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration fails. After this patch, auto-generated by iotest nodenames will be the same. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py |

[Qemu-block] [PATCH 12/22] qcow2-dirty-bitmap: add qcow2_bitmap_load_check()

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
The function checks existing of the bitmap without loading it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 15 +++ block/qcow2-dirty-bitmap.c | 5 + block/qcow2.c| 1 + block/qcow2.h

[Qemu-block] [PATCH 21/22] qcow2-dirty-bitmap: add AUTO flag

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
The bitmap should be auto-loaded if auto flag is set. For now, actually, there are no methods to set it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-dirty-bitmap.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[Qemu-block] [PATCH 20/22] iotests: test internal persistent dirty bitmap

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Add simple test cases for testing persistent dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/160| 112 ++ tests/qemu-iotests/160.out| 21 tests/qemu-iotests/group | 1

[Qemu-block] [PATCH 07/22] qcow2: Bitmaps extension: structs and consts

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Add data structures and constraints accordingly to docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/Makefile.objs| 2 +- block/qcow2-dirty-bitmap.c | 47 ++ block/qcow2.h | 34

[Qemu-block] [PATCH 11/22] qcow2: add dirty bitmaps extension

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Add dirty bitmap extension as specified in docs/specs/qcow2.txt. Load bitmap headers on open. Handle close and update_header. Handle resize: for now, just block resize if there are dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 89

[Qemu-block] [PATCH 17/22] qcow2-dirty-bitmap: add IN_USE flag

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
This flag is set on bitmap load and unset on store. If it is already set when loading the bitmap, the bitmap should not be load (it is in use by other drive or it is inconsistent (was not successfully saved)) Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[Qemu-block] [PATCH 19/22] iotests: add VM.test_launcn()

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Test vm can launch and print output in case of fail. This function is needed for testing erroneous cases Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 20 1 file changed, 20 insertions(+) diff --git

[Qemu-block] [PATCH 14/22] block: add bdrv_load_dirty_bitmap()

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
The funcion loads dirty bitmap from file, using underlying driver function. Note: the function doesn't change BdrvDirtyBitmap.file field. This field is only used by bdrv_store_dirty_bitmap() function and is ONLY written by bdrv_dirty_bitmap_set_file() function. Signed-off-by: Vladimir

[Qemu-block] [PATCH 01/22] block: Add two dirty bitmap getters

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
From: Fam Zheng For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c

[Qemu-block] [PATCH 18/22] qcow2-dirty-bitmaps: disallow stroing bitmap to other bs

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Check, that bitmap is stored to the owning bs. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 12 block/qcow2-dirty-bitmap.c | 5 + include/block/dirty-bitmap.h | 2 ++ 3 files changed, 19 insertions(+) diff --git

[Qemu-block] [PATCH 10/22] qcow2-dirty-bitmap: add qcow2_bitmap_store()

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
This function stores block dirty bitmap to qcow2. If the bitmap with the same name, size and granularity already exists, it will be rewritten, if the bitmap with the same name exists but granularity or size does not match, an error will be genrated. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH 08/22] qcow2-dirty-bitmap: read dirty bitmap directory

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Adds qcow2_read_bitmaps, reading bitmap directory as specified in docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-dirty-bitmap.c | 165 + block/qcow2.h | 10 +++ 2 files changed,

[Qemu-block] [PATCH 06/22] hbitmap: load/store

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
Add functions for load/store HBitmap to BDS, using clusters table: Last level of the bitmap is splitted into chunks of 'cluster_size' size. Each cell of the table contains offset in bds, to load/store corresponding chunk. Also, 0 in cell means all-zeroes-chunk (should not be saved) 1 in

Re: [Qemu-block] [PATCH 01/22] block: Add two dirty bitmap getters

2016-03-15 Thread Vladimir Sementsov-Ogievskiy
On 15.03.2016 23:04, Vladimir Sementsov-Ogievskiy wrote: From: Fam Zheng For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [PATCH v3] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-15 Thread Jeff Cody
On Thu, Mar 10, 2016 at 07:38:00PM +0100, Niels de Vos wrote: > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > it possible to detect sparse areas in files. > > Signed-off-by: Niels de Vos > > --- > Tested by compiling and running "qemu-img map

Re: [Qemu-block] [PATCH v3] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-15 Thread Jeff Cody
On Tue, Mar 15, 2016 at 03:50:17PM -0400, Jeff Cody wrote: > On Thu, Mar 10, 2016 at 07:38:00PM +0100, Niels de Vos wrote: > > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > > it possible to detect sparse areas in files. > > > > Signed-off-by: Niels de Vos

[Qemu-block] [PATCH 0/2] Emit QUORUM_REPORT_BAD for reads in fifo mode

2016-03-15 Thread Alberto Garcia
This is a follow-up to the "Separate QUORUM_REPORT_BAD events" series: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02402.html If there's an I/O error in one of Quorum children then QEMU should emit QUORUM_REPORT_BAD. However this is not working with read-pattern=fifo. This patch

[Qemu-block] [PATCH 2/2] iotests: Test QUORUM_REPORT_BAD in fifo mode

2016-03-15 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/148 | 17 +++-- tests/qemu-iotests/148.out | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/148 b/tests/qemu-iotests/148 index 30bc379..d066ec3 100644 ---

[Qemu-block] [PATCH 1/2] quorum: Emit QUORUM_REPORT_BAD for reads in fifo mode

2016-03-15 Thread Alberto Garcia
If there's an I/O error in one of Quorum children then QEMU should emit QUORUM_REPORT_BAD. However this is not working with read-pattern=fifo. This patch fixes this problem. Signed-off-by: Alberto Garcia --- block/quorum.c | 17 + 1 file changed, 9

Re: [Qemu-block] [Qemu-devel] [PULL 00/40] Block patches

2016-03-15 Thread Peter Maydell
On 14 March 2016 at 17:37, Kevin Wolf wrote: > The following changes since commit 0dcee62261cb044339b10e4bda1f67ef7dc82803: > > Merge remote-tracking branch > 'remotes/amit-migration/tags/migration-for-2.6-7' into staging (2016-03-14 > 13:51:21 +) > > are available in

Re: [Qemu-block] [PATCH v4 19/26] block: add generic full disk encryption driver

2016-03-15 Thread Daniel P. Berrange
On Tue, Mar 15, 2016 at 07:59:19AM -0600, Eric Blake wrote: > On 02/29/2016 05:00 AM, Daniel P. Berrange wrote: > > Add a block driver that is capable of supporting any full disk > > encryption format. This utilizes the previously added block > > encryption code, and at this time supports the LUKS

Re: [Qemu-block] [Qemu-ppc] [PATCH] Replacing (and removing) get_ticks_per_sec() function with NANOSECONDS_PER_SECOND Signed-off-by: Rutuja Shah <rutu.shah...@gmail.com>

2016-03-15 Thread Laurent Vivier
On 10/03/2016 20:30, rutu.shah...@gmail.com wrote: > From: Rutuja Shah > > --- > audio/audio.c | 2 +- > audio/noaudio.c | 4 ++-- > audio/spiceaudio.c| 2 +- > audio/wavaudio.c | 2 +- > backends/baum.c | 2 +- >

[Qemu-block] [PULL v2 13/51] fdc: add function to determine drive chs limits

2016-03-15 Thread Michael S. Tsirkin
From: Roman Kagan When populating ACPI objects for floppy drives one needs to provide the maximum values for cylinder, sector, and head number the drive supports. This patch adds a function that iterates through the array of predefined floppy drive formats and returns the

[Qemu-block] [PATCH] block: Fix qemu_root_bds_opts.head initialisation

2016-03-15 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 322ca03..e7b8676 100644 --- a/blockdev.c +++ b/blockdev.c @@ -4221,7 +4221,7 @@ QemuOptsList qemu_common_drive_opts = { static

Re: [Qemu-block] [PATCH v4 19/26] block: add generic full disk encryption driver

2016-03-15 Thread Eric Blake
On 02/29/2016 05:00 AM, Daniel P. Berrange wrote: > Add a block driver that is capable of supporting any full disk > encryption format. This utilizes the previously added block > encryption code, and at this time supports the LUKS format. > > The driver code is capable of supporting any format

Re: [Qemu-block] [PATCH v12 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-03-15 Thread Wen Congyang
On 03/11/2016 08:21 PM, Alberto Garcia wrote: > On Thu 10 Mar 2016 03:49:40 AM CET, Changlong Xie wrote: >> @@ -81,6 +82,8 @@ typedef struct BDRVQuorumState { >> bool rewrite_corrupted;/* true if the driver must rewrite-on-read >> corrupted >> * block if Quorum

Re: [Qemu-block] [PATCH v3] block/gluster: add support for SEEK_DATA/SEEK_HOLE

2016-03-15 Thread Niels de Vos
On Tue, Mar 15, 2016 at 03:52:02PM -0400, Jeff Cody wrote: > On Tue, Mar 15, 2016 at 03:50:17PM -0400, Jeff Cody wrote: > > On Thu, Mar 10, 2016 at 07:38:00PM +0100, Niels de Vos wrote: > > > GlusterFS 3.8 contains support for SEEK_DATA and SEEK_HOLE. This makes > > > it possible to detect sparse