AuthorCommitMessageCommit dateIssues
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
b4a276b303eqcow2-dirty-bitmap: add EXTRA_DATA_COMPATIBLE flagIf this flag is unset and exta data present the bitmap should be read-only. For now just return error for this case.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
7a2638cc411qcow2-dirty-bitmap: add AUTO flagThe bitmap should be auto-loaded if auto flag is set. For now, actually, there are no methods to set it.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
94003e7932ciotests: test internal persistent dirty bitmapAdd simple test cases for testing persistent dirty bitmaps.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
bfeb068329biotests: add VM.test_launcn()Test vm can launch and print output in case of fail. This function is needed for testing erroneous cases
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
414bfc398bcqcow2-dirty-bitmaps: disallow stroing bitmap to other bsCheck, that bitmap is stored to the owning bs.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
857a922044bqcow2-dirty-bitmap: add IN_USE flagThis 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))
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
c557a2263b8qemu: command line option for dirty bitmapsThe 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 of '-node' options. granularity Granularity (in bytes) for created dirty bitmap. If the bitmap is...
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
edf96dc71c8qcow2-dirty-bitmap: add autoclear bitAdd 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.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
b6fceb90e2ablock: add bdrv_load_dirty_bitmap()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.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
46d8be523eeblock: store persistent dirty bitmapsPersistent dirty bitmaps are the bitmaps, for which the new field BdrvDirtyBitmap.file is not NULL. We save all persistent dirty bitmaps owned by BlockDriverState in corresponding bdrv_close(). BdrvDirtyBitmap.file is a BlockDriverState, where we want to save the bitmap. It may be set in bdrv_dirty_bitmap_set_file() only once. bdrv_ref/bdrv_unref are used for BdrvDirtyBitmap.file to be sure tha...
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
e705f16ad6dqcow2-dirty-bitmap: add qcow2_bitmap_load_check()The function checks existing of the bitmap without loading it.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
92431e41bb5qcow2: add dirty bitmaps extensionAdd 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.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
800bbb63c90qcow2-dirty-bitmap: add qcow2_bitmap_store()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.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
84846980ec8qcow2-dirty-bitmap: add qcow2_bitmap_load()This function loads block dirty bitmap from qcow2.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
8f1ecbcfc96qcow2-dirty-bitmap: read dirty bitmap directoryAdds qcow2_read_bitmaps, reading bitmap directory as specified in docs/specs/qcow2.txt
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
e93411e73efqcow2: Bitmaps extension: structs and constsAdd data structures and constraints accordingly to docs/specs/qcow2.txt
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
7ffc049956dhbitmap: load/storeAdd 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 cell means all-ones-chunk (should not be saved) hbitmap_prepare_store() fills table with 0...
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
c14b28936a2qapi: add md5 checksum of last dirty bitmap level to query-blockReviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
4f35d8907b2iotests: add default node-nameWhen 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.
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
bc1e38b3fc1iotests: maintain several vms in testThe 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 <jsnow@redhat.com>
Vladimir Sementsov-OgievskiyVladimir Sementsov-Ogievskiy
8b21d964f95block: fix bdrv_dirty_bitmap_granularity signatureMake getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Fam ZhengFam Zheng
e298afa8712block: Add two dirty bitmap gettersFor dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Peter MaydellPeter Maydell
1a8b4081683MMerge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingBlock layer patches # gpg: Signature made Mon 14 Mar 2016 16:36:52 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (40 commits) iotests: Add test for QMP event rates monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode monitor: Separate QUORUM_REPORT_BAD events according to the node name quorum: F...
Kevin WolfKevin Wolf
0d611402a1eMMerge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-03-14-v2' into queue-blockBlock patches for pi day, v2. # gpg: Signature made Mon Mar 14 17:35:29 2016 CET using RSA key ID E838ACAD # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" * mreitz/tags/pull-block-for-kevin-2016-03-14-v2: iotests: Add test for QMP event rates monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode monitor: Separate QUORUM_REPORT_BAD events according to the node name...
Alberto GarciaAlberto Garcia
7223c48cff7iotests: Add test for QMP event ratesThis test verifies that the rate-limited QMP events are emitted at a maximum rate of 1 per second as defined in monitor_qapi_event_conf in monitor.c It also checks that QUORUM_REPORT_BAD events generated from different nodes are kept in separate queues so they don't mask each other. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 0dbd3ee...
Alberto GarciaAlberto Garcia
dc599978718monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest modeThis allows us to perform tests on the monitor queues to verify that the rate limits are enforced. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: dde511809e954a5c32d5b648bb184c03c89ed5d5.1457610443.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Alberto GarciaAlberto Garcia
6d425eb94d3monitor: Separate QUORUM_REPORT_BAD events according to the node nameThe QUORUM_REPORT_BAD event is emitted whenever there's an I/O error in a child of a Quorum device. This event is emitted at a maximum rate of 1 per second. This means that an error in one of the children will mask errors in the other children if they happen within the same 1 second interval. This patch modifies qapi_event_throttle_equal() so QUORUM_REPORT_BAD events are kept separately if the...
Alberto GarciaAlberto Garcia
b9c600d2071quorum: Fix crash in quorum_aio_cb()quorum_aio_cb() emits the QUORUM_REPORT_BAD event if there's an I/O error in a Quorum child. However sacb->aiocb must be correctly initialized for this to happen. read_quorum_children() and read_fifo_child() are not doing this, which results in a QEMU crash. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 8138570d071ba7e25db3736979234a1fd...
Max ReitzMax Reitz
e3f66e03680iotests: Correct 081's reference outputThe newly added type parameter for the QUORUM_REPORT_BAD event changed the output of iotest 081, so the reference should be amended accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 1457705687-27122-1-git-send-email-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com>
Fam ZhengFam Zheng
fcce736719dblock: Remove unused typedef of BlockDriverDirtyHandlerSigned-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-6-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam ZhengFam Zheng
ebab225910dblock: Move block dirty bitmap code to separate filesThe only code change is making bdrv_dirty_bitmap_truncate public. It is used in block.c. Also two long lines (bdrv_get_dirty) are wrapped. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-5-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam ZhengFam Zheng
9a3f5cf1bfdtypedefs: Add BdrvDirtyBitmapFollowing patches to refactor and move block dirty bitmap code could use this. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-4-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam ZhengFam Zheng
78f9dc859d2block: Include hbitmap.h in block.hSigned-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-3-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Fam ZhengFam Zheng
b2f56462d51backup: Use Bitmap to replace "s->bitmap""s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-2-git-send-email-famz@redhat.com Signed-off...
Peter MaydellPeter Maydell
618a5a8bc52MMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging# gpg: Signature made Mon 14 Mar 2016 11:27:01 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/tracing-pull-request: trace: separate MMIO tracepoints from TB-access tracepoints trace: include CPU index in trace_memory_region_*() Signed-off-by: Peter Ma...
Kevin WolfKevin Wolf
b8f45cdf782vpc: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
c4bea1690e3vmdk: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
10bf03af128vhdx: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
a08f0c3b5fevdi: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
fba98d455a7sheepdog: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
8a56fdadaffqed: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
23588797b68qcow2: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
6af40160209qcow: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
8942764f548parallels: Use BB functions in .bdrv_create()All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
c10c9d96158block: Introduce blk_set_allow_write_beyond_eof()We check that the guest can't write beyond the end of its disk, but for other internal users it can make sense to allow growing a file. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
6340472c545block: Use writeback in .bdrv_create() implementationsThere's no reason to use a writethrough cache mode while creating an image. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin WolfKevin Wolf
2073d410ce3hmp: Extend drive_del to delete nodes without BBNow that we can use drive_add to create new nodes without a BB, we also want to be able to delete such nodes again. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Kevin WolfKevin Wolf
abb21ac3e60hmp: 'drive_add -n' for creating a node without BBThis patch adds an option to the drive_add HMP command to create only a BlockDriverState without a BlockBackend on top. The motivation for this is that libvirt needs to specify options to a migration target (specifically, detect-zeroes). drive-mirror doesn't allow specifying options, and the proper way to do this is to create the target BDS separately with blockdev-add (where you can specify o...
Fam ZhengFam Zheng
71968dbfd8dvmdk: Switch to heap arrays for vmdk_parent_openSigned-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fam ZhengFam Zheng
5997c210b9evmdk: Switch to heap arrays for vmdk_read_cidSigned-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>