Re: [Qemu-block] [Qemu-devel] [PATCH 25/25] qcow2-bitmap: improve check_constraints_on_bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Add detailed error messages. > yay > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-bitmap.c | 63 > ++-- > 1 file changed, 41

Re: [Qemu-block] [Qemu-devel] [PATCH 24/25] qmp: block-dirty-bitmap-remove: remove persistent

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Remove persistent bitmap from the storage on block-dirty-bitmap-remove. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > blockdev.c | 10 ++ > 1

Re: [Qemu-block] [Qemu-devel] [PATCH 23/25] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_remove_persistent_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > block/qcow2-bitmap.c | 41

Re: [Qemu-block] [Qemu-devel] [PATCH 22/25] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Interface for removing persistent bitmap from its storage. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > block/dirty-bitmap.c | 18

Re: [Qemu-block] [Qemu-devel] [PATCH 21/25] qcow2-bitmap: refcounts

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Calculate refcounts for qcow2 bitmaps. It is needed for qcow2's qemu-img > check implementation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- >

Re: [Qemu-block] [PATCH RFC v2 0/2] block: Crude initial implementation of -blockdev

2017-02-14 Thread Markus Armbruster
Markus Armbruster writes: > This is based on "[PATCH 00/24] QemuOpts util/cutils: Fix and clean up > number conversions". > > v2: Support KEY=VALUE,... syntax as well. Forgot to mention: the thing collapses when KEY has a type other than string. There's one reason this is

Re: [Qemu-block] [Qemu-devel] [PATCH 20/25] qcow2-refcount: rename inc_refcounts() and make it public

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > This is needed for the following patch, which will introduce refcounts > checking for qcow2 bitmaps. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH 19/25] iotests: test qcow2 persistent dirty bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > tests/qemu-iotests/165 | 89 > ++ >

Re: [Qemu-block] [Qemu-devel] [PATCH 18/25] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > block/dirty-bitmap.c | 5 + > blockdev.c | 29 + >

Re: [Qemu-block] [Qemu-devel] [PATCH 17/25] qmp: add autoload parameter to block-dirty-bitmap-add

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Optional. Default is false. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > Reviewed-by: Max Reitz > --- > blockdev.c | 18

Re: [Qemu-block] [Qemu-devel] [PATCH 16/25] qmp: add persistent flag to block-dirty-bitmap-add

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. > Default is false. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > Reviewed-by: Max

Re: [Qemu-block] [Qemu-devel] regarding bug name : -hda FAT:. limited to 504MBytes

2017-02-14 Thread Thomas Huth
Hi, On 14.02.2017 22:38, Shubham Kumar wrote: > Since the problem seems like the used FAT-16 file system , > Will it solve the problem if I change the code of vvfat.c for FAT-32 file > system to increase acceptable file size ? As far as I know, FAT16 can already support up to 4GB file

Re: [Qemu-block] [Qemu-devel] [PATCH 15/25] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_can_store_new_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz > --- > block/qcow2-bitmap.c | 40

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/24] qcow2: persistent dirty bitmaps

2017-02-14 Thread Eric Blake
On 02/14/2017 01:02 PM, John Snow wrote: > > > On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> > > Hi! :) > >> There is a new update of qcow2-bitmap series - v14. >> > > Having the cover letter be 00/24 but including 25 patches confuses the > patch scraping tool a

Re: [Qemu-block] [Qemu-devel] [PATCH 14/25] block: add bdrv_can_store_new_dirty_bitmap

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > This will be needed to check some restrictions before making bitmap > persistent in qmp-block-dirty-bitmap-add (this functionality will be > added by future patch) > > Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [RFC PATCH V3] qemu-img: make convert async

2017-02-14 Thread Kevin Wolf
Am 14.02.2017 um 21:43 hat Peter Lieven geschrieben: > Von: Kevin Wolf > An: Peter Lieven > Kopie: , , , > > Gesendet: 14.02.2017 17:20 > Betreff: Re: [RFC PATCH V3] qemu-img:

Re: [Qemu-block] [Qemu-devel] [RFC PATCH V3] qemu-img: make convert async

2017-02-14 Thread Eric Blake
[meta-comment] On 02/14/2017 02:43 PM, Peter Lieven wrote: > > > > > Von: Kevin Wolf > An: Peter Lieven > Kopie: , , > , > Gesendet: 14.02.2017 17:20 >

Re: [Qemu-block] [RFC PATCH V3] qemu-img: make convert async

2017-02-14 Thread Peter Lieven
Von: Kevin Wolf An: Peter Lieven Kopie: , , , Gesendet: 14.02.2017 17:20 Betreff: Re: [RFC PATCH V3] qemu-img: make convert async Am 14.02.2017 um

Re: [Qemu-block] [PATCH] backup: allow target without .bdrv_get_info

2017-02-14 Thread Eric Blake
On 02/14/2017 09:05 AM, Fam Zheng wrote: >> Proposed NBD protocol extension - NBD_OPT_INFO should finally solve this >> problem. >> But until it is not realized, we need allow backup to nbd target due to >> backward >> compatibility. >> >> Furthermore, is it entirely ok to disallow backup if bds

[Qemu-block] [PATCH v5 7/7] tests: Add coverage for recent block geometry fixes

2017-02-14 Thread Eric Blake
Use blkdebug's new geometry constraints to emulate setups that have caused recent regression fixes: write zeroes asserting when running through a loopback block device with max-transfer smaller than cluster size, and discard rounding away portions of requests not aligned to preferred boundaries.

Re: [Qemu-block] [Qemu-devel] [PATCH 13/25] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Realize block bitmap storing interface, to allow qcow2 images store > persistent bitmaps. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-block] [PATCH v5 6/7] blkdebug: Add ability to override unmap geometries

2017-02-14 Thread Eric Blake
Make it easier to simulate various unusual hardware setups (for example, recent commits 3482b9b and b8d0a98 affect the Dell Equallogic iSCSI with its 15M preferred and maximum unmap and write zero sizing, or b2f95fe deals with the Linux loopback block device having a max_transfer of 64k), by

[Qemu-block] [PATCH v5 4/7] blkdebug: Add pass-through write_zero and discard support

2017-02-14 Thread Eric Blake
In order to test the effects of artificial geometry constraints on operations like write zero or discard, we first need blkdebug to manage these actions. It also allows us to inject errors on those operations, just like we can for read/write/flush. We can also test the contract promised by the

[Qemu-block] [PATCH v5 5/7] blkdebug: Simplify override logic

2017-02-14 Thread Eric Blake
Rather than store into a local variable, then copy to the struct if the value is valid, then reporting errors otherwise, it is simpler to just store into the struct and report errors if the value is invalid. This however requires that the struct store a 64-bit number, rather than a narrower type.

[Qemu-block] [PATCH v5 2/7] qcow2: Discard/zero clusters by byte count

2017-02-14 Thread Eric Blake
Passing a byte offset, but sector count, when we ultimately want to operate on cluster granularity, is madness. Clean up the external interfaces to take both offset and count as bytes, while still keeping the assertion added previously that the caller must align the values to a cluster. Then

[Qemu-block] [PATCH v5 3/7] blkdebug: Sanity check block layer guarantees

2017-02-14 Thread Eric Blake
Commits 04ed95f4 and 1a62d0ac updated the block layer to auto-fragment any I/O to fit within device boundaries. Additionally, when using a minimum alignment of 4k, we want to ensure the block layer does proper read-modify-write rather than requesting I/O on a slice of a sector. Let's enforce that

[Qemu-block] [PATCH v5 0/7] add blkdebug tests

2017-02-14 Thread Eric Blake
Available as a tag at: git fetch git://repo.or.cz/qemu/ericb.git nbd-blkdebug-v5 v4 was: https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg02834.html Since then: - Rebase to master - Address comments from Max 001/7:[] [--] 'qcow2: Assert that cluster operations are aligned'

[Qemu-block] [PATCH v5 1/7] qcow2: Assert that cluster operations are aligned

2017-02-14 Thread Eric Blake
qcow2_discard_clusters() is set up to silently ignore sub-cluster head or tail on unaligned requests. However, it is easy to audit the various callers: qcow2_snapshot_create() has always passed aligned data since the call was introduced in 1ebf561; qcow2_co_pdiscard() has passed aligned clusters

Re: [Qemu-block] [PATCH 0/2] qemu-iotest tweaks

2017-02-14 Thread Kevin Wolf
Am 14.02.2017 um 17:21 hat Jeff Cody geschrieben: > Some minor qemu-iotest tweaks. > > The second patch makes it easier to add some upcoming protocols such as VXHS, > that do not support .bdrv_create. Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/24] qcow2: persistent dirty bitmaps

2017-02-14 Thread John Snow
On 02/14/2017 11:59 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > Hi! :) > There is a new update of qcow2-bitmap series - v14. > Having the cover letter be 00/24 but including 25 patches confuses the patch scraping tool a good deal. Also, can you include the "v14" in the patch emails

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] qemu-iotests: redirect nbd server stdout to /dev/null

2017-02-14 Thread Eric Blake
On 02/14/2017 12:15 PM, Jeff Cody wrote: > Some iotests (e.g. 174) try to filter the output of _make_test_image by > piping the stdout. Pipe the server stdout to /dev/null, so that filter > pipe does not need to wait until process completion. > > Signed-off-by: Jeff Cody > ---

[Qemu-block] [PATCH 1/1] qemu-iotests: redirect nbd server stdout to /dev/null

2017-02-14 Thread Jeff Cody
Some iotests (e.g. 174) try to filter the output of _make_test_image by piping the stdout. Pipe the server stdout to /dev/null, so that filter pipe does not need to wait until process completion. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 2 +- 1 file

Re: [Qemu-block] [Qemu-devel] [PATCH 13/24] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2017-02-14 Thread John Snow
On 02/14/2017 10:36 AM, Vladimir Sementsov-Ogievskiy wrote: > 14.02.2017 03:38, John Snow wrote: >> >> On 02/03/2017 04:40 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Realize block bitmap storing interface, to allow qcow2 images store >>> persistent bitmaps. >>> >>> Signed-off-by: Vladimir

Re: [Qemu-block] [Qemu-devel] [PATCH 11/24] block: introduce persistent dirty bitmaps

2017-02-14 Thread John Snow
On 02/14/2017 07:05 AM, Vladimir Sementsov-Ogievskiy wrote: > 11.02.2017 02:20, John Snow wrote: >> On 02/03/2017 04:40 AM, Vladimir Sementsov-Ogievskiy wrote: >>> +void bdrv_store_persistent_dirty_bitmaps(BlockDriverState *bs, Error >>> **errp) >>> +{ >>> +BlockDriver *drv = bs->drv; >>> +

[Qemu-block] [PATCH 21/25] qcow2-bitmap: refcounts

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Calculate refcounts for qcow2 bitmaps. It is needed for qcow2's qemu-img check implementation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 76 ++

[Qemu-block] [PATCH 02/25] specs/qcow2: do not use wording 'bitmap header'

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
A bitmap directory entry is sometimes called a 'bitmap header'. This patch leaves only one name - 'bitmap directory entry'. The name 'bitmap header' creates misunderstandings with 'qcow2 header' and 'qcow2 bitmap header extension' (which is extension of qcow2 header) Signed-off-by: Vladimir

[Qemu-block] [PATCH 13/25] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Realize block bitmap storing interface, to allow qcow2 images store persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 487 +--

[Qemu-block] [PATCH v14 00/24] qcow2: persistent dirty bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new update of qcow2-bitmap series - v14. web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=qcow2-bitmap-v14 git: https://src.openvz.org/scm/~vsementsov/qemu.git (tag qcow2-bitmap-v14) v14: 07: use '|=' to update need_update_header add John's r-b add

Re: [Qemu-block] [Qemu-devel] [PATCH] backup: allow target without .bdrv_get_info

2017-02-14 Thread John Snow
On 02/14/2017 09:48 AM, Vladimir Sementsov-Ogievskiy wrote: > Currently backup to nbd target is broken, as nbd doesn't have > .bdrv_get_info realization. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > Since commit > > commit

[Qemu-block] [PATCH 22/25] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Interface for removing persistent bitmap from its storage. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 18 ++ include/block/block_int.h| 3 +++

[Qemu-block] [PATCH 06/25] block/dirty-bitmap: add deserialize_ones func

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for qcow2 bitmap loading, to handle unallocated bitmap parts, marked as all-ones. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: John Snow

[Qemu-block] [PATCH 14/25] block: add bdrv_can_store_new_dirty_bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
This will be needed to check some restrictions before making bitmap persistent in qmp-block-dirty-bitmap-add (this functionality will be added by future patch) Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c

[Qemu-block] [PATCH 18/25] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 8

[Qemu-block] [PATCH 15/25] qcow2: add .bdrv_can_store_new_dirty_bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_can_store_new_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 40 block/qcow2.c| 1 + block/qcow2.h| 4

[Qemu-block] [PATCH 11/25] block: introduce persistent dirty bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-block] [PATCH 10/25] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Mirror AUTO flag from Qcow2 bitmap in BdrvDirtyBitmap. This will be needed in future, to save this flag back to Qcow2 for persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow

[Qemu-block] [PATCH 08/25] block: introduce auto-loading bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps stored in the disk image, which should be loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Max

[Qemu-block] [PATCH 19/25] iotests: test qcow2 persistent dirty bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/165 | 89 ++ tests/qemu-iotests/165.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95

[Qemu-block] [PATCH 25/25] qcow2-bitmap: improve check_constraints_on_bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Add detailed error messages. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 63 ++-- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c

[Qemu-block] [PATCH 24/25] qmp: block-dirty-bitmap-remove: remove persistent

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Remove persistent bitmap from the storage on block-dirty-bitmap-remove. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- blockdev.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/blockdev.c b/blockdev.c index

[Qemu-block] [PATCH 07/25] qcow2: add bitmaps extension

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Add bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 state and check constraints. For now, disable image resize if it has bitmaps. It will be fixed later. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[Qemu-block] [PATCH 01/25] specs/qcow2: fix bitmap granularity qemu-specific note

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- docs/specs/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 80cdfd0..dda53dd 100644 ---

[Qemu-block] [PATCH 05/25] block: fix bdrv_dirty_bitmap_granularity signature

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf Signed-off-by: Vladimir

[Qemu-block] [PATCH 03/25] hbitmap: improve dirty iter

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Make dirty iter resistant to resetting bits in corresponding HBitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- include/qemu/hbitmap.h | 26 --

[Qemu-block] [PATCH 04/25] tests: add hbitmap iter test

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Test that hbitmap iter is resistant to bitmap resetting. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/test-hbitmap.c | 19

[Qemu-block] [PATCH 20/25] qcow2-refcount: rename inc_refcounts() and make it public

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
This is needed for the following patch, which will introduce refcounts checking for qcow2 bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-refcount.c | 53 ++

[Qemu-block] [PATCH 09/25] qcow2: add .bdrv_load_autoloading_dirty_bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Extra data in bitmaps is not supported for now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[Qemu-block] [PATCH 16/25] qmp: add persistent flag to block-dirty-bitmap-add

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz --- blockdev.c | 18

[Qemu-block] [PATCH 23/25] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Realize .bdrv_remove_persistent_dirty_bitmap interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2-bitmap.c | 41 + block/qcow2.c| 1 + block/qcow2.h|

[Qemu-block] [PATCH 12/25] block/dirty-bitmap: add bdrv_dirty_bitmap_next()

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 10 insertions(+) diff --git

[Qemu-block] [PATCH 17/25] qmp: add autoload parameter to block-dirty-bitmap-add

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz --- blockdev.c | 18 -- qapi/block-core.json | 6 +- 2 files changed, 21

[Qemu-block] [PATCH 1/2] qemu-iotests: Test 137 only supports 'file' protocol

2017-02-14 Thread Jeff Cody
Since test 137 make uses of qcow2.py, only local files are supported. Signed-off-by: Jeff Cody --- tests/qemu-iotests/137 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index e5e30de..eb91e51 100755 ---

[Qemu-block] [PATCH 2/2] qemu-iotests: add ability to exclude certain protocols from tests

2017-02-14 Thread Jeff Cody
Add the ability for shell script tests to exclude specific protocols. This is useful to allow all protocols except ones known to not support a feature used in the test (e.g. .bdrv_create). Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 12 1 file

[Qemu-block] [PATCH 0/2] qemu-iotest tweaks

2017-02-14 Thread Jeff Cody
Some minor qemu-iotest tweaks. The second patch makes it easier to add some upcoming protocols such as VXHS, that do not support .bdrv_create. Jeff Cody (2): qemu-iotests: Test 137 only supports 'file' protocol qemu-iotests: add ability to exclude certain protocols from tests

Re: [Qemu-block] [RFC PATCH V3] qemu-img: make convert async

2017-02-14 Thread Kevin Wolf
Am 14.02.2017 um 14:39 hat Peter Lieven geschrieben: > this is something I have been thinking about for almost 2 years now. > we heavily have the following two use cases when using qemu-img convert. > > a) reading from NFS and writing to iSCSI for deploying templates > b) reading from iSCSI and

[Qemu-block] [PATCH RFC v2 2/2] block: Crude initial implementation of -blockdev

2017-02-14 Thread Markus Armbruster
The new command line option -blockdev works like QMP command blockdev-add. The option argument may be given in JSON syntax, exactly as in QMP. Example usage: -blockdev '{"node-name": "foo", "driver": "raw", "file": {"driver": "file", "filename": "foo.img"} }' The JSON argument doesn't

[Qemu-block] [PATCH RFC v2 1/2] util/qemu-option: New opt_parse_qdict()

2017-02-14 Thread Markus Armbruster
opt_parse_qdict() parses KEY=VALUE,... into a QDict. Works like qemu_opts_parse(), except: * Returns a QDict instead of a QemuOpts (d'oh). * It supports nesting, unlike QemuOpts: a KEY is split into key components at '.' (dotted key convention; the block layer does something similar on top

[Qemu-block] [PATCH RFC v2 0/2] block: Crude initial implementation of -blockdev

2017-02-14 Thread Markus Armbruster
This is based on "[PATCH 00/24] QemuOpts util/cutils: Fix and clean up number conversions". v2: Support KEY=VALUE,... syntax as well. Markus Armbruster (2): util/qemu-option: New opt_parse_qdict() block: Crude initial implementation of -blockdev include/qemu/option.h | 3 ++

Re: [Qemu-block] [Qemu-devel] [PATCH 13/24] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
14.02.2017 03:38, John Snow wrote: On 02/03/2017 04:40 AM, Vladimir Sementsov-Ogievskiy wrote: Realize block bitmap storing interface, to allow qcow2 images store persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

Re: [Qemu-block] [PATCH] backup: allow target without .bdrv_get_info

2017-02-14 Thread Denis V. Lunev
On 02/14/2017 06:05 PM, Fam Zheng wrote: > On Tue, 02/14 17:48, Vladimir Sementsov-Ogievskiy wrote: >> Currently backup to nbd target is broken, as nbd doesn't have >> .bdrv_get_info realization. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> >> Hi all! >>

Re: [Qemu-block] [PATCH] backup: allow target without .bdrv_get_info

2017-02-14 Thread Fam Zheng
On Tue, 02/14 17:48, Vladimir Sementsov-Ogievskiy wrote: > Currently backup to nbd target is broken, as nbd doesn't have > .bdrv_get_info realization. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > Since commit > > commit

[Qemu-block] [PATCH] backup: allow target without .bdrv_get_info

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
Currently backup to nbd target is broken, as nbd doesn't have .bdrv_get_info realization. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! Since commit commit 4c9bca7e39a6e07ad02c1dcde3478363344ec60b Author: John Snow Date: Thu Feb 25

[Qemu-block] [RFC PATCH V3] qemu-img: make convert async

2017-02-14 Thread Peter Lieven
this is something I have been thinking about for almost 2 years now. we heavily have the following two use cases when using qemu-img convert. a) reading from NFS and writing to iSCSI for deploying templates b) reading from iSCSI and writing to NFS for backups In both processes we use libiscsi

Re: [Qemu-block] [Qemu-devel] [PATCH 11/24] block: introduce persistent dirty bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
11.02.2017 02:20, John Snow wrote: On 02/03/2017 04:40 AM, Vladimir Sementsov-Ogievskiy wrote: New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [Qemu-devel] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps

2017-02-14 Thread Vladimir Sementsov-Ogievskiy
11.02.2017 01:51, John Snow wrote: On 02/03/2017 04:40 AM, Vladimir Sementsov-Ogievskiy wrote: Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened and become BdrvDirtyBitmaps for the corresponding drive. Extra data in bitmaps is not

Re: [Qemu-block] [RFC PATCH 06/41] block: Involve block drivers in permission granting

2017-02-14 Thread Fam Zheng
On Tue, 02/14 11:36, Kevin Wolf wrote: > Am 14.02.2017 um 06:51 hat Fam Zheng geschrieben: > > On Mon, 02/13 18:22, Kevin Wolf wrote: > > > +int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared, > > > +Error **errp) > > > +{ > > > +int ret; > > >

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 09/41] block: Default .bdrv_child_perm() for format drivers

2017-02-14 Thread Fam Zheng
On Tue, 02/14 11:37, Kevin Wolf wrote: > Am 14.02.2017 um 07:01 hat Fam Zheng geschrieben: > > On Mon, 02/13 18:22, Kevin Wolf wrote: > > > Almost all format drivers have the same characteristics as far as > > > permissions are concerned: They have one or more children for storing > > > their own

Re: [Qemu-block] [RFC PATCH 09/41] block: Default .bdrv_child_perm() for format drivers

2017-02-14 Thread Kevin Wolf
Am 14.02.2017 um 07:01 hat Fam Zheng geschrieben: > On Mon, 02/13 18:22, Kevin Wolf wrote: > > Almost all format drivers have the same characteristics as far as > > permissions are concerned: They have one or more children for storing > > their own data and, more importantly, metadata (can be

[Qemu-block] [PATCH 21/24] util/cutils: Let qemu_strtosz*() optionally reject trailing crap

2017-02-14 Thread Markus Armbruster
Change the qemu_strtosz() & friends to return -EINVAL when @endptr is null and the conversion doesn't consume the string completely. Matches how qemu_strtol() & friends work. Only test_qemu_strtosz_simple() passes a null @endptr. No functional change there, because its conversion consumes the

Re: [Qemu-block] [RFC PATCH 06/41] block: Involve block drivers in permission granting

2017-02-14 Thread Kevin Wolf
Am 14.02.2017 um 06:51 hat Fam Zheng geschrieben: > On Mon, 02/13 18:22, Kevin Wolf wrote: > > +int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared, > > +Error **errp) > > +{ > > +int ret; > > + > > +ret = bdrv_child_check_perm(c, perm,

[Qemu-block] [PATCH 22/24] util/cutils: Return qemu_strtosz*() error and value separately

2017-02-14 Thread Markus Armbruster
This makes qemu_strtosz(), qemu_strtosz_mebi() and qemu_strtosz_metric() similar to qemu_strtoi64(), except negative values are rejected. Cc: Dr. David Alan Gilbert Cc: Eduardo Habkost (maintainer:X86) Cc: Kevin Wolf (supporter:Block

[Qemu-block] [PATCH 23/24] util/cutils: Change qemu_strtosz*() from int64_t to uint64_t

2017-02-14 Thread Markus Armbruster
This will permit its use in parse_option_size(). Cc: Dr. David Alan Gilbert Cc: Eduardo Habkost (maintainer:X86) Cc: Kevin Wolf (supporter:Block layer core) Cc: Max Reitz (supporter:Block layer core) Cc:

[Qemu-block] [PATCH 20/24] qemu-img: Wrap cvtnum() around qemu_strtosz()

2017-02-14 Thread Markus Armbruster
Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster --- qemu-img.c | 58 +++--- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git

Re: [Qemu-block] [PATCH] block: Swap request limit definitions

2017-02-14 Thread Alberto Garcia
On Mon 13 Feb 2017 06:13:38 PM CET, Max Reitz wrote: >>> -#define BDRV_REQUEST_MAX_SECTORS MIN(SIZE_MAX >> BDRV_SECTOR_BITS, \ >>> - INT_MAX >> BDRV_SECTOR_BITS) >>> -#define BDRV_REQUEST_MAX_BYTES (BDRV_REQUEST_MAX_SECTORS << >>> BDRV_SECTOR_BITS) >>>