Re: [Qemu-block] [PATCH for-4.1 0/2] Fix check for default backing files in bdrv_reopen_prepare()

2019-04-13 Thread Alberto Garcia
On Sat 13 Apr 2019 05:48:11 PM CEST, Max Reitz wrote: >> Ok, you can leave out the second patch then. The first one should >> still be correct, right? > > I just think it’s unnecessary because as of my series both > backing_file and auto_backing_file serve the purpose. Ok then! Berto

Re: [Qemu-block] [PATCH v5 07/11] block: introduce backup-top filter driver

2019-04-13 Thread Vladimir Sementsov-Ogievskiy
13.04.2019 19:08, Vladimir Sementsov-Ogievskiy wrote: > 16.01.2019 19:02, Max Reitz wrote: >> On 29.12.18 13:20, Vladimir Sementsov-Ogievskiy wrote: >>> Backup-top filter does copy-before-write operation. It should be >>> inserted above active disk and has a target node for CBW, like the >>>

[Qemu-block] [PATCH v3 7/7] iotests: Test qemu-img convert -C --salvage

2019-04-13 Thread Max Reitz
We do not support this combination (yet), so this should yield an error message. Signed-off-by: Max Reitz --- tests/qemu-iotests/082 | 1 + tests/qemu-iotests/082.out | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/082 b/tests/qemu-iotests/082 index

[Qemu-block] [PATCH v3 5/7] blkdebug: Inject errors on .bdrv_co_block_status()

2019-04-13 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- qapi/block-core.json | 5 - block/blkdebug.c | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 717b13f7f5..2aa675a192 100644 --- a/qapi/block-core.json +++

[Qemu-block] [PATCH v3 3/7] blkdebug: Add @iotype error option

2019-04-13 Thread Max Reitz
This new error option allows users of blkdebug to inject errors only on certain kinds of I/O operations. Users usually want to make a very specific operation fail, not just any; but right now they simply hope that the event that triggers the error injection is followed up with that very

[Qemu-block] [PATCH v3 4/7] blkdebug: Add "none" event

2019-04-13 Thread Max Reitz
Together with @iotypes and @sector, this can be used to trap e.g. the first read or write access to a certain sector without having to know what happens internally in the block layer, i.e. which "real" events happen right before such an access. Signed-off-by: Max Reitz --- qapi/block-core.json

[Qemu-block] [PATCH v3 6/7] iotests: Test qemu-img convert --salvage

2019-04-13 Thread Max Reitz
This test converts a simple image to another, but blkdebug injects block_status and read faults at some offsets. The resulting image should be the same as the input image, except that sectors that could not be read have to be 0. Signed-off-by: Max Reitz --- tests/qemu-iotests/249 | 163

[Qemu-block] [PATCH v3 0/7] qemu-img: Add salvaging mode to convert

2019-04-13 Thread Max Reitz
Hi, This series adds a --salvage option to qemu-img convert. With this, qemu-img will not abort when it encounters an I/O error. Instead, it tries to narrow it down and will treat the affected sectors as being completely 0 (and print a warning). Testing this is not so easy, because while real

[Qemu-block] [PATCH v3 1/7] qemu-img: Move quiet into ImgConvertState

2019-04-13 Thread Max Reitz
Move img_convert()'s quiet flag into the ImgConvertState so it is accessible by nested functions. -q dictates that it suppresses anything but errors, so if those functions want to emit warnings, they need to query this flag first. (There currently are no such warnings, but there will be as of

[Qemu-block] [PATCH v3 2/7] qemu-img: Add salvaging mode to convert

2019-04-13 Thread Max Reitz
This adds a salvaging mode (--salvage) to qemu-img convert which ignores read errors and treats the respective areas as containing only zeroes. This can be used for instance to at least partially recover the data from terminally corrupted qcow2 images. Signed-off-by: Max Reitz --- qemu-img.c

Re: [Qemu-block] [PATCH v3 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-04-13 Thread Max Reitz
On 25.02.19 20:08, Max Reitz wrote: > This series implements .bdrv_refresh_filename() for the ssh block > driver, along with an appropriate .bdrv_dirname() so we don't chop off > query strings for backing files with relative filenames. > > > v3: > - Keep iotests 104 and 207 working > > > Max

Re: [Qemu-block] [PATCH 0/3] qemu-img: Allow rebase with no input base

2019-04-13 Thread Max Reitz
Ping again (I feel like I just need to start merging unreviewed patches until I break something (can't take that long) so you get so scared of my patches that you at least refuse them outright) On 13.07.18 13:14, Max Reitz wrote: > This series allows using qemu-img rebase on images that do not

Re: [Qemu-block] [PATCH v5 07/11] block: introduce backup-top filter driver

2019-04-13 Thread Vladimir Sementsov-Ogievskiy
16.01.2019 19:02, Max Reitz wrote: > On 29.12.18 13:20, Vladimir Sementsov-Ogievskiy wrote: >> Backup-top filter does copy-before-write operation. It should be >> inserted above active disk and has a target node for CBW, like the >> following: >> >> +---+ >> | Guest | >>

Re: [Qemu-block] [PATCH for-4.1 0/2] Fix check for default backing files in bdrv_reopen_prepare()

2019-04-13 Thread Max Reitz
On 13.04.19 10:46, Alberto Garcia wrote: > On Sat 13 Apr 2019 02:56:57 AM CEST, Max Reitz wrote: >>> Patch 2 fixes a different (but slightly related) issue that I found >>> while preparing the first patch. >> >> I think the real problem is that bs->backing_file is not a cache for >>

[Qemu-block] [PATCH for-next 2/2] qemu-img: Make create hint at protocol options

2019-04-13 Thread Max Reitz
qemu-img create allows giving just a format and "-o help" to get a list of the options supported by that format. Users may not realize that the protocol level may offer even more options, which they only get to see by specifying a filename. This patch adds a note to hint at that fact.

[Qemu-block] [PATCH for-next 0/2] qemu-img: Make create hint at protocol options

2019-04-13 Thread Max Reitz
https://bugzilla.redhat.com/show_bug.cgi?id=1698863 reports that while "qemu-img create -f raw" supports the "preallocation" option, it is not listed under "-o help". It turns out it is, but only if you specify a target filename. Users may not realize this, but a note should help. Max Reitz

[Qemu-block] [PATCH for-next 1/2] iotests: Perform the correct test in 082

2019-04-13 Thread Max Reitz
In the "amend" section of 082, we perform a single "convert" test (namely "convert -o help"). That does not make sense, especially because we have done exactly that "convert" test earlier in 082 already. Replacing "convert" by "amend" yields an error, which is correct because there is no point

Re: [Qemu-block] [PATCH for-4.1 0/2] Fix check for default backing files in bdrv_reopen_prepare()

2019-04-13 Thread Alberto Garcia
On Sat 13 Apr 2019 02:56:57 AM CEST, Max Reitz wrote: >> Patch 2 fixes a different (but slightly related) issue that I found >> while preparing the first patch. > > I think the real problem is that bs->backing_file is not a cache for > bs->backing->bs->filename. > > In fact, every user of