[Qemu-block] [PATCH v11 28/31] block/curl: Implement bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/curl.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/curl.c b/block/curl.c index 96790fdc70..a5d3e64b84 100644 --- a/block/curl.c +++ b/block/curl.c @@ -963,6 +963,23 @@ static int64_t curl_getlengt

[Qemu-block] [PATCH v11 22/31] block: Add BlockDriver.bdrv_gather_child_options

2018-10-05 Thread Max Reitz
Some follow-up patches will rework the way bs->full_open_options is refreshed in bdrv_refresh_filename(). The new implementation will remove the need for the block drivers' bdrv_refresh_filename() implementations to set bs->full_open_options; instead, it will be generic and use static information f

[Qemu-block] [PATCH v11 23/31] block: Generically refresh runtime options

2018-10-05 Thread Max Reitz
Instead of having every block driver which implements bdrv_refresh_filename() copy all of the strong runtime options over to bs->full_open_options, implement this process generically in bdrv_refresh_filename(). This patch only adds this new generic implementation, it does not remove the old functi

[Qemu-block] [PATCH v11 27/31] block/curl: Harmonize option defaults

2018-10-05 Thread Max Reitz
Both of the defaults we currently have in the curl driver are named based on a slightly different schema, let's unify that and call both CURL_BLOCK_OPT_${NAME}_DEFAULT. While at it, we can add a macro for the third option for which a default exists, namely "sslverify". Signed-off-by: Max Reitz R

[Qemu-block] [PATCH v11 26/31] block/nvme: Fix bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Currently, nvme's bdrv_refresh_filename() is an exact copy of null's implementation. However, for null, "null-co://" and "null-aio://" are indeed valid filenames -- for nvme, they are not, as a device address is still required. The correct implementation should generate a filename of the form "nv

[Qemu-block] [PATCH v11 29/31] block/null: Generate filename even with latency-ns

2018-10-05 Thread Max Reitz
While we cannot represent the latency-ns option in a filename, it is not a strong option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[Qemu-block] [PATCH v11 31/31] iotests: Test json:{} filenames of internal BDSs

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 139 + tests/qemu-iotests/224.out | 18 + tests/qemu-iotests/group | 1 + 3 files changed, 158 insertions(+) create mode 100755 tests/qemu-iotests/224 create mode 100644 tests/qemu-iotests/224

[Qemu-block] [PATCH v11 24/31] block: Purify .bdrv_refresh_filename()

2018-10-05 Thread Max Reitz
Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all BlockDriver.bdrv_

[Qemu-block] [PATCH v11 21/31] block: Add strong_runtime_opts to BlockDriver

2018-10-05 Thread Max Reitz
This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into BDS.full_open_options (a

[Qemu-block] [PATCH v11 30/31] block: BDS options may lack the "driver" option

2018-10-05 Thread Max Reitz
When BDSs are created by qemu itself (e.g. as filters in block jobs), they may not have a "driver" option in their options QDict. When generating a json:{} filename, however, it must always be present. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 6 ++ 1 file changed,

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

2018-10-05 Thread Max Reitz
If 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 Reviewed-by: A

[Qemu-block] [PATCH v11 16/31] quorum: Make bdrv_dirname() return NULL

2018-10-05 Thread Max Reitz
While the common implementation for bdrv_dirname() should return NULL for quorum BDSs already (because they do not have a file node and their exact_filename field should be empty), there is no reason not to make that explicit. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto

[Qemu-block] [PATCH v11 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2018-10-05 Thread Max Reitz
Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- include/block/block.h | 7 +++--- block.c | 53 ++

[Qemu-block] [PATCH v11 19/31] block: Use bdrv_dirname() for relative filenames

2018-10-05 Thread Max Reitz
bdrv_get_full_backing_filename_from_filename() breaks down when it comes to JSON filenames. Using bdrv_dirname() as the basis is better because since we have BDS, we can descend through the BDS tree to the protocol layer, which gives us a greater probability of finding a non-JSON name; also, bdrv_d

[Qemu-block] [PATCH v11 17/31] block/nbd: Make bdrv_dirname() return NULL

2018-10-05 Thread Max Reitz
The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will). Signed-off-by: Max Reitz

[Qemu-block] [PATCH v11 15/31] blkverify: Make bdrv_dirname() return NULL

2018-10-05 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 Reviewed-by: Eric Blake Revie

[Qemu-block] [PATCH v11 18/31] block/nfs: Implement bdrv_dirname()

2018-10-05 Thread Max Reitz
While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/nfs.c | 15 ++

[Qemu-block] [PATCH v11 20/31] iotests: Add quorum case to test 110

2018-10-05 Thread Max Reitz
Test 110 tests relative backing filenames for complex BDS trees. Now that the originally supposedly failing test passes, let us add a new failing test: Quorum can never work automatically (without detecting whether all child nodes have the same base directory, but that would be rather inconsistent

[Qemu-block] [PATCH v11 14/31] block: Add bdrv_dirname()

2018-10-05 Thread Max Reitz
This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by format drivers, bec

[Qemu-block] [PATCH v11 09/31] block: Make path_combine() return the path

2018-10-05 Thread Max Reitz
Besides being safe for arbitrary path lengths, after some follow-up patches all callers will want a freshly allocated buffer anyway. In the meantime, path_combine_deprecated() is added which has the same interface as path_combine() had before this patch. All callers to that function will be conver

[Qemu-block] [PATCH v11 12/31] block: Add bdrv_make_absolute_filename()

2018-10-05 Thread Max Reitz
This is a general function for making a filename that is relative to a certain BDS absolute. It calls bdrv_get_full_backing_filename_from_filename() for now, but that will be changed in a follow-up patch. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 27 +++

[Qemu-block] [PATCH v11 08/31] iotests: Add test for backing file overrides

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/228 | 235 + tests/qemu-iotests/228.out | 84 + tests/qemu-iotests/group | 1 + 3 files changed, 320 insertions(+) create mode 100755 tests/qemu-iotests/228 crea

[Qemu-block] [PATCH v11 13/31] block: Fix bdrv_find_backing_image()

2018-10-05 Thread Max Reitz
bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or bdrv_make_absolute_filename() instead of trying to do what those functions do by itself. path_combine_deprecated() can now be dropped, so let's do that. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 3

[Qemu-block] [PATCH v11 11/31] block: bdrv_get_full_backing_filename's ret. val.

2018-10-05 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 Reviewed-by: Alberto Garcia --- include/block/block.h | 3 +-- block.c | 48 +++ block/qapi

[Qemu-block] [PATCH v11 04/31] block: Add BDS.auto_backing_file

2018-10-05 Thread Max Reitz
If the backing file is overridden, this most probably does change the guest-visible data of a BDS. Therefore, we will need to consider this in bdrv_refresh_filename(). To see whether it has been overridden, we might want to compare bs->backing_file and bs->backing->bs->filename. However, bs->bac

[Qemu-block] [PATCH v11 06/31] iotests.py: Add filter_imgfmt()

2018-10-05 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4e67fbbe96..5c45788dac 100644 --- a/tests/qemu-iotests/iotest

[Qemu-block] [PATCH v11 00/31] block: Fix some filename generation issues

2018-10-05 Thread Max Reitz
Once more, I’ll spare both me and you another iteration of the cover letter, so see here: http://lists.nongnu.org/archive/html/qemu-block/2017-09/msg01030.html (Although this series no longer includes a @base-directory option.) In regards to the last version, the biggest change is that I dropped

[Qemu-block] [PATCH v11 07/31] iotests.py: Add node_info()

2018-10-05 Thread Max Reitz
This function queries a node; since we cannot do that right now, it executes query-named-block-nodes and returns the matching node's object. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests

[Qemu-block] [PATCH v11 05/31] block: Respect backing bs in bdrv_refresh_filename

2018-10-05 Thread Max Reitz
Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and @backing (that being vm

[Qemu-block] [PATCH v11 02/31] block: Use children list in bdrv_refresh_filename

2018-10-05 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, mirror, and blklogwrites. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c

[Qemu-block] [PATCH v11 01/31] block: Use bdrv_refresh_filename() to pull

2018-10-05 Thread Max Reitz
Before this patch, bdrv_refresh_filename() is used in a pushing manner: Whenever the BDS graph is modified, the parents of the modified edges are supposed to be updated (recursively upwards). However, that is nonviable, considering that we want child changes not to concern parents. Also, in the l

[Qemu-block] [PATCH v11 03/31] block: Skip implicit nodes for filename info

2018-10-05 Thread Max Reitz
bdrv_refresh_filename() should simply skip all implicit nodes. They are supposed to be invisible to the user, so they should not appear in filename information. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block.c | 14 ++ 1 file changed, 14 ins

Re: [Qemu-block] [PATCH v3 1/3] qapi: add x-debug-query-block-graph

2018-10-05 Thread Max Reitz
On 02.10.18 15:01, Vladimir Sementsov-Ogievskiy wrote: > 28.09.2018 19:31, Max Reitz wrote: >> On 23.08.18 17:46, Vladimir Sementsov-Ogievskiy wrote: >>> Add a new command, returning block nodes (and their users) graph. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> --- >>>   qapi/block-c

Re: [Qemu-block] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
Thank you, hope that's fixed now) On 10/05/2018 07:47 PM, Eric Blake wrote: > On 10/5/18 11:40 AM, Vladimir Sementsov-Ogievskiy wrote: >> 05.10.2018 18:52, Kevin Wolf wrote: >>> Hi Vladimir, >>> >>> can you please check your mailer settings? The plain text version of the >>> emails is hardly legib

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Eric Blake
On 10/5/18 1:02 PM, Eric Blake wrote: On 10/5/18 12:49 PM, Cleber Rosa wrote: We could add a git pre-commit hook grep'ing for "^#!\ *(/usr/bin/env|/bin/(b?a)?sh)" in the 1st line and then checking the file perms. Good idea.  Probably better to send that as a different patch, right? Yes, s

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Kevin Wolf
Am 05.10.2018 um 18:54 hat Peter Maydell geschrieben: > On 5 October 2018 at 17:17, Kevin Wolf wrote: > > Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: > >> On 5 October 2018 at 15:38, Peter Maydell wrote: > >> > The test-bdrv-drain test fails at least 50% of the time > >> > on my OS buil

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Eric Blake
On 10/5/18 12:49 PM, Cleber Rosa wrote: We could add a git pre-commit hook grep'ing for "^#!\ *(/usr/bin/env|/bin/(b?a)?sh)" in the 1st line and then checking the file perms. Good idea. Probably better to send that as a different patch, right? Yes, separate patch. For that matter, "^#!/"

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Cleber Rosa
On 10/5/18 9:36 AM, Philippe Mathieu-Daudé wrote: > On 04/10/2018 18:18, Cleber Rosa wrote: >> Commit 990dc39c made all tests executable at the time, but 218 came in >> later, and missing those permissions. >> >> Signed-off-by: Cleber Rosa >> --- >> tests/qemu-iotests/218 | 0 >> 1 file change

Re: [Qemu-block] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
05.10.2018 18:52, Kevin Wolf wrote: > Hi Vladimir, > > can you please check your mailer settings? The plain text version of the > emails is hardly legible because it mixes quotes text and replies. I > had to manually open the HTML part to figure out what you really wrote. I've sent it from other t

Re: [Qemu-block] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Eric Blake
On 10/5/18 11:40 AM, Vladimir Sementsov-Ogievskiy wrote: 05.10.2018 18:52, Kevin Wolf wrote: Hi Vladimir, can you please check your mailer settings? The plain text version of the emails is hardly legible because it mixes quotes text and replies. I had to manually open the HTML part to figure ou

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Peter Maydell
On 5 October 2018 at 17:17, Kevin Wolf wrote: > Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: >> On 5 October 2018 at 15:38, Peter Maydell wrote: >> > The test-bdrv-drain test fails at least 50% of the time >> > on my OS build system. Disable the test until we can figure >> >> This is a t

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Kevin Wolf
Am 05.10.2018 um 16:41 hat Peter Maydell geschrieben: > On 5 October 2018 at 15:38, Peter Maydell wrote: > > The test-bdrv-drain test fails at least 50% of the time > > on my OS build system. Disable the test until we can figure > > This is a typo: I meant "OSX build system". > > > out what's go

Re: [Qemu-block] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Kevin Wolf
Hi Vladimir, can you please check your mailer settings? The plain text version of the emails is hardly legible because it mixes quotes text and replies. I had to manually open the HTML part to figure out what you really wrote. Am 05.10.2018 um 17:00 hat Vladimir Sementsov-Ogievskiy geschrieben: >

Re: [Qemu-block] [PATCH v3 13/18] block: introduce new filter driver: fleecing-hook

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
05.10.2018 00:19, Vladimir Sementsov-Ogievskiy wrote: On 10/04/2018 05:52 PM, Kevin Wolf wrote: Am 04.10.2018 um 15:59 hat Vladimir Sementsov-Ogievskiy geschrieben: 04.10.2018 15:44, Kevin Wolf wrote: Am 01.10.2018 um 12:29 hat Vladimir Sementsov-Ogievskiy geschrieben: Fleecing-hook filter does cop

Re: [Qemu-block] [PATCH] crypto: Fix defaults in QCryptoBlockCreateOptionsLUKS

2018-10-05 Thread Daniel P . Berrangé
On Fri, Oct 05, 2018 at 04:52:02PM +0200, Alberto Garcia wrote: > The values specified in the documentation don't match the actual > defaults set in qcrypto_block_luks_create(). > > Signed-off-by: Alberto Garcia > --- > qapi/crypto.json | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(

[Qemu-block] [PATCH] crypto: Fix defaults in QCryptoBlockCreateOptionsLUKS

2018-10-05 Thread Alberto Garcia
The values specified in the documentation don't match the actual defaults set in qcrypto_block_luks_create(). Signed-off-by: Alberto Garcia --- qapi/crypto.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/crypto.json b/qapi/crypto.json index a51b434412..b2a4cff

Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Peter Maydell
On 5 October 2018 at 15:38, Peter Maydell wrote: > The test-bdrv-drain test fails at least 50% of the time > on my OS build system. Disable the test until we can figure This is a typo: I meant "OSX build system". > out what's going on, as this makes pull request processing > very difficult. > >

[Qemu-block] [PATCH] tests: Disable test-bdrv-drain

2018-10-05 Thread Peter Maydell
The test-bdrv-drain test fails at least 50% of the time on my OS build system. Disable the test until we can figure out what's going on, as this makes pull request processing very difficult. Signed-off-by: Peter Maydell --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [Qemu-block] [Qemu-devel] [PATCH 07/10] scripts/decodetree.py: remove unused imports

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:18, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé > --- > scripts/decodetree.py | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/scripts/decodetree.py b/scripts/decodetree.py > index 277f9a9bba..457cffea90 100755 > --- a/scripts/

Re: [Qemu-block] [Qemu-devel] [PATCH 08/10] scripts/decodetree.py: fix reference to attributes

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:18, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé > --- > scripts/decodetree.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/decodetree.py b/scripts/decodetree.py > index 457cffea90..37c76b5507 100755 >

Re: [Qemu-block] [Qemu-devel] [PATCH 04/10] qemu-iotests: fix filename containing checks

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:18, Cleber Rosa wrote: > Commit cce293a2945 moved some functions from common.config to > common.rc, but the error messages still reference the old file > location. > > Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/common.rc | 4 ++--

Re: [Qemu-block] [Qemu-devel] [PATCH 03/10] qemu-iotests: make 218 executable

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:18, Cleber Rosa wrote: > Commit 990dc39c made all tests executable at the time, but 218 came in > later, and missing those permissions. > > Signed-off-by: Cleber Rosa > --- > tests/qemu-iotests/218 | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > mode change 100644 => 1

Re: [Qemu-block] [Qemu-devel] [PATCH 10/10] scripts/qemu.py: remove trailing quotes on docstring

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:18, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé > --- > scripts/qemu.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/qemu.py b/scripts/qemu.py > index 7abe26de69..676eb9709a 100644 > --- a/scripts/qem

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] qemu-img.c: comment typo fix

2018-10-05 Thread Philippe Mathieu-Daudé
On 04/10/2018 18:53, Cleber Rosa wrote:> On 10/4/18 12:48 PM, Eric Blake wrote: >> On 10/4/18 11:18 AM, Cleber Rosa wrote: >>> A trivial comment typo fix. >>> >>> Signed-off-by: Cleber Rosa >>> --- >>>   qemu-img.c | 2 +- >>>   1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/qem

Re: [Qemu-block] [Qemu-devel] [PATCH 02/10] tests/tcg/README: fix location for lm32 tests

2018-10-05 Thread Alex Bennée
Cleber Rosa writes: > Point to the right and obvious location for lm32 tests. > > Signed-off-by: Cleber Rosa > --- > tests/tcg/README | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/tcg/README b/tests/tcg/README > index a5643d33e7..2a58f9a058 100644 > --- a/test

Re: [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-05 Thread Peter Maydell
On 5 October 2018 at 14:40, Alberto Garcia wrote: > On Fri 05 Oct 2018 02:55:13 PM CEST, Peter Maydell wrote: >>> +rs->check_cache_dropped = >>> +qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false); >>> + >>> +/* This driver's reopen function doesn't currently allow changin

Re: [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-05 Thread Alberto Garcia
On Fri 05 Oct 2018 03:40:09 PM CEST, Alberto Garcia wrote: > On Fri 05 Oct 2018 02:55:13 PM CEST, Peter Maydell wrote: >>> +rs->check_cache_dropped = >>> +qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false); >>> + >>> +/* This driver's reopen function doesn't currently allow

Re: [Qemu-block] [Qemu-devel] [PATCH 01/10] qemu-img.c: comment typo fix

2018-10-05 Thread Peter Maydell
On 4 October 2018 at 17:48, Eric Blake wrote: > On 10/4/18 11:18 AM, Cleber Rosa wrote: >> >> A trivial comment typo fix. >> >> Signed-off-by: Cleber Rosa >> --- a/qemu-img.c >> +++ b/qemu-img.c >> @@ -1085,7 +1085,7 @@ static int64_t find_nonzero(const uint8_t *buf, >> int64_t n) >> } >>

Re: [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-05 Thread Alberto Garcia
On Fri 05 Oct 2018 02:55:13 PM CEST, Peter Maydell wrote: >> +rs->check_cache_dropped = >> +qemu_opt_get_bool_del(opts, "x-check-cache-dropped", false); >> + >> +/* This driver's reopen function doesn't currently allow changing >> + * other options, so let's put them back in the

[Qemu-block] bdrv_replace_child crashes

2018-10-05 Thread Vladimir Sementsov-Ogievskiy
Hi Kevin! In commit 33a610c3986 "block: Involve block drivers in permission granting" you write:     if (old_bs) {     /* Update permissions for old node. This is guaranteed to succeed * because we're just taking a parent away, so we're loosening * restrictions. */

Re: [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-05 Thread Kevin Wolf
Am 05.10.2018 um 14:55 hat Peter Maydell geschrieben: > On 1 October 2018 at 18:18, Kevin Wolf wrote: > > From: Alberto Garcia > > > > The file-posix code is used for the "file", "host_device" and > > "host_cdrom" drivers, and it allows reopening images. However the only > > option that is actual

Re: [Qemu-block] [PULL 08/23] file-posix: Forbid trying to change unsupported options during reopen

2018-10-05 Thread Peter Maydell
On 1 October 2018 at 18:18, Kevin Wolf wrote: > From: Alberto Garcia > > The file-posix code is used for the "file", "host_device" and > "host_cdrom" drivers, and it allows reopening images. However the only > option that is actually processed is "x-check-cache-dropped", and > changes in all othe