Re: [Qemu-block] [Qemu-devel] [PATCH v3] iotests: Add test for dataplane mirroring

2017-09-29 Thread Max Reitz
On 2017-09-29 19:33, Eric Blake wrote: > On 09/29/2017 12:08 PM, Max Reitz wrote: >> Signed-off-by: Max Reitz <mre...@redhat.com> >> --- >> v3: Make the test actually pass (the reference output from v2 only >> worked with v1 of the test...) >>

Re: [Qemu-block] [PATCH] block/mirror: check backing in bdrv_mirror_top_flush

2017-09-29 Thread Max Reitz
On 2017-09-29 17:22, Vladimir Sementsov-Ogievskiy wrote: > Backing may be zero after failed bdrv_append in mirror_start_job, > which leads to SIGSEGV. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > similar SIGSEGV. > looks like (I guess by code, don't have

[Qemu-block] [PATCH v6 07/25] block: bdrv_get_full_backing_filename's ret. val.

2017-09-29 Thread Max Reitz
Make bdrv_get_full_backing_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz <mre...@redhat.com> --- include/block/block.h | 3 +-- block.c | 47 +-- block/

[Qemu-block] [PATCH v6 22/25] block: Do not copy exact_filename from format file

2017-09-29 Thread Max Reitz
If the a format BDS's file BDS is in turn a format BDS, we cannot simply use the same filename, because when opening a BDS tree based on a filename alone, qemu will create only one format node on top of one protocol node (disregarding a potential backing file). Signed-off-by: Max Reitz <

[Qemu-block] [PATCH v6 04/25] block: Respect backing bs in bdrv_refresh_filename

2017-09-29 Thread Max Reitz
is not. If this is done, opening the BDS with the plain filename of its file will not be correct, so we may not set bs->exact_filename in that case. iotest 051 contains test cases for overwriting the backing file, and so its output changes with this patch applied (which I consider a good thing). Signed-off-by:

[Qemu-block] [PATCH v6 11/25] blkverify: Make bdrv_dirname() return NULL

2017-09-29 Thread Max Reitz
blkverify's BDSs have a file BDS, but we do not want this to be preferred over the raw node. There is no way to decide between the two (and not really a reason to, either), so just return NULL in blkverify's implementation of bdrv_dirname(). Signed-off-by: Max Reitz <mre...@redhat.com> Re

[Qemu-block] [PATCH v6 02/25] block: Use children list in bdrv_refresh_filename

2017-09-29 Thread Max Reitz
bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quorum, commit, and mirror. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com>

[Qemu-block] [PATCH v6 00/25] block: Fix some filename generation issues

2017-09-29 Thread Max Reitz
block: Fix FIXME from "Add BDS.backing_overridden"' 024/25:[] [--] 'block/curl: Implement bdrv_refresh_filename()' 025/25:[] [--] 'block/null: Generate filename even with latency-ns' Max Reitz (25): block/mirror: Small absolute-paths simplification block: Use children list in bdrv_refresh_filename

Re: [Qemu-block] [PATCH] block/mirror: check backing in bdrv_mirror_top_refresh_filename

2017-09-29 Thread Max Reitz
On 2017-09-28 14:03, Vladimir Sementsov-Ogievskiy wrote: > Backing may be zero after failed bdrv_attach_child in > bdrv_set_backing_hd, which leads to SIGSEGV. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Thanks, applied to my block branch:

Re: [Qemu-block] [PATCH v3 2/2] qcow2: truncate the tail of the image file after shrinking the image

2017-09-29 Thread Max Reitz
On 2017-09-28 11:27, Pavel Butsykin wrote: > Now after shrinking the image, at the end of the image file, there might be a > tail that probably will never be used. So we can find the last used cluster > and > cut the tail. > > Signed-off-by: Pavel Butsykin >