Re: [PATCH 1/2] file-posix: Correctly read max_segments of SG nodes

2020-09-17 Thread Max Reitz
On 12.08.20 00:51, Dmitry Fomichev wrote: > If scsi-generic driver is in use, an SG node can be specified in > the command line in place of a regular SCSI device. In this case, > sg_get_max_segments() fails to open max_segments entry in sysfs > because /dev/sgX is a character device. As the result,

Re: [PATCH v2] qemu-img: Support bitmap --merge into backing image

2020-09-17 Thread Max Reitz
On 15.09.20 15:31, Eric Blake wrote: > On 9/15/20 3:57 AM, Max Reitz wrote: >> On 14.09.20 21:10, Eric Blake wrote: >>> If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a >>> bitmap from top into base, qemu-img was failing with: >>>

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-16 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Clients may want to know when an export has finally disappeard > (block-export-del returns earlier than that in the general case), so add > a QAPI event for it. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 12 > block/expo

Re: [PATCH 16/29] block/export: Allocate BlockExport in blk_exp_add()

2020-09-16 Thread Max Reitz
lues instead of having to parse the > options a second time. > > For symmetry, move freeing the BlockExport to blk_exp_unref(). > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > --- > include/block/export.h | 8 +++- > include/block/nbd.h| 11 +++

[PULL 22/22] block/rbd: add 'namespace' to qemu_rbd_strong_runtime_opts[]

2020-09-15 Thread Max Reitz
...@redhat.com> Reviewed-by: Jason Dillaman Signed-off-by: Max Reitz --- block/rbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/rbd.c b/block/rbd.c index 171c67e3a0..9bd2bce716 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -1247,6 +1247,7 @@ static QemuOptsList qemu_r

[PULL 20/22] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
ed-by: Max Reitz [mreitz: Mark compat=0.10 unsupported for iotest 125] Signed-off-by: Max Reitz --- block/qcow2.c | 1 + tests/qemu-iotests/125 | 44 ++ tests/qemu-iotests/125.out | 28 ++-- 3 files changed, 53 insertions(+

[PULL 15/22] qcow2: Handle QCowL2Meta on error in preallocate_co()

2020-09-15 Thread Max Reitz
ing qcow2_handle_l2meta(). Signed-off-by: Alberto Garcia Message-Id: Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/qcow2.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3e8114dcf8..d241fb7

[PULL 21/22] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-15 Thread Max Reitz
final host offset directly. The function is also renamed accordingly. See 388e581615 for a similar change to qcow2_get_cluster_offset(). Signed-off-by: Alberto Garcia Message-Id: <9bfef50ec9200d752413be4fc2aeb22a28378817.1599833007.git.be...@igalia.com> Reviewed-by: Max Reitz Signed-off-b

[PULL 12/22] qemu-img: Explicit number replaced by a constant

2020-09-15 Thread Max Reitz
From: Yi Li Signed-off-by: Yi Li Message-Id: <20200819013607.32280-1-y...@winhong.com> Reviewed-by: Alberto Garcia Reviewed-by: Stefano Garzarella Signed-off-by: Max Reitz --- qemu-img.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu

[PULL 10/22] qcow2: Don't check nb_clusters when removing l2meta from the list

2020-09-15 Thread Max Reitz
this is no longer the case, l2meta (nowadays a pointer to a list) is only allocated when needed and nb_clusters is guaranteed to be > 0 so this check is unnecessary. Signed-off-by: Alberto Garcia Message-Id: Signed-off-by: Max Reitz --- block/qcow2.c | 4 +--- 1 file changed, 1 insertion(+)

[PULL 18/22] block/rbd: remove runtime_opts

2020-09-15 Thread Max Reitz
From: John Snow This saw its last use in 4bfb274165ba. Signed-off-by: John Snow Message-Id: <20200806211345.2925343-2-js...@redhat.com> Signed-off-by: Max Reitz --- block/rbd.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/block/rbd.c b

[PULL 08/22] qcow2: Use macros for the L1, refcount and bitmap table entry sizes

2020-09-15 Thread Max Reitz
From: Alberto Garcia This patch replaces instances of sizeof(uint64_t) in the qcow2 driver with macros that indicate what those sizes are actually referring to. Signed-off-by: Alberto Garcia Message-Id: <20200828110828.13833-1-be...@igalia.com> Signed-off-by: Max Reitz --- block/q

[PULL 13/22] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-15 Thread Max Reitz
uth Message-Id: <20200907113824.134788-1-th...@redhat.com> Signed-off-by: Max Reitz --- tests/check-block.sh | 3 +++ tests/qemu-iotests/030 | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/check-block.sh b/tests/check-block.sh index 8e29c868e5..a5a69060e1 100755 --- a/tests/check-block

[PULL 11/22] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-15 Thread Max Reitz
From: Alberto Garcia The current text corresponds to an earlier, simpler version of this function and it does not explain how it works now. Signed-off-by: Alberto Garcia Message-Id: Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 24 ++-- 1 file changed, 14

[PULL 06/22] block/quorum.c: stable children names

2020-09-15 Thread Max Reitz
hen Reviewed-by: Alberto Garcia Message-Id: <5d5f930424c1c770754041aa8ad6421dc4e2b58e.1596536719.git.lukasstra...@web.de> Signed-off-by: Max Reitz --- block/quorum.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/block/quorum.c b/block/quoru

[PULL 19/22] block/qcow: remove runtime opts

2020-09-15 Thread Max Reitz
From: John Snow Introduced by d85f4222b468, These were seemingly never used at all. Signed-off-by: John Snow Message-Id: <20200806211345.2925343-3-js...@redhat.com> Signed-off-by: Max Reitz --- block/qcow.c | 9 - 1 file changed, 9 deletions(-) diff --git a/block/qcow.c b

[PULL 05/22] qemu-iotests: Simplify FilePath __init__

2020-09-15 Thread Max Reitz
From: Nir Soffer Use list comprehension instead of append loop. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-6-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PULL 09/22] qcow2: Fix removal of list members from BDRVQcow2State.cluster_allocs

2020-09-15 Thread Max Reitz
request, but it can be reproduced with the included test case. Signed-off-by: Alberto Garcia Message-Id: <3440a1c4d53c4fe48312b478c96accb338cbef7c.1599150873.git.be...@igalia.com> Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 3 -- tests/qemu-iotests/305

[PULL 14/22] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-15 Thread Max Reitz
..@nutanix.com> Signed-off-by: Max Reitz --- block/vhdx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 791eb90263..356ec4c455 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -816,9 +816,9 @@ static int vhdx_parse_metadata(Blo

[PULL 17/22] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-15 Thread Max Reitz
..@igalia.com> Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index d241fb734c..77c43ce178 100644 --- a/block/qcow2.c +

[PULL 03/22] qemu-iotests: Support varargs syntax in FilePaths

2020-09-15 Thread Max Reitz
ck2): But this is more clear and calling optional argument as positional arguments is bad idea anyway. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-4-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/194| 4 ++-- tests/qem

[PULL 04/22] qemu-iotests: Merge FilePaths and FilePath

2020-09-15 Thread Max Reitz
or creating temporary files instead of 3. Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id: <20200828232152.205833-5-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/194| 2 +- tests/qemu-iotests/208| 2 +- tests/qemu-iotests/222

[PULL 07/22] qemu-img: avoid unaligned read requests during convert

2020-09-15 Thread Max Reitz
luster boundaries. Signed-off-by: Peter Lieven Message-Id: <20200901125129.6398-1...@kamp.de> [mreitz: Disable vhdx for 251] Signed-off-by: Max Reitz --- qemu-img.c | 22 ++ tests/qemu-iotests/251 | 7 +-- 2 files changed, 27 insertions(+), 2 deletions(-)

[PULL 16/22] qcow2: Make qcow2_free_any_clusters() free only one cluster

2020-09-15 Thread Max Reitz
n Wolf Signed-off-by: Max Reitz --- block/qcow2.h | 4 ++-- block/qcow2-cluster.c | 6 +++--- block/qcow2-refcount.c | 8 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 83cfa0c391..b73a4cf1f8 100644 --- a/block/qcow2.h +++ b

[PULL 02/22] qemu-iotests: Fix FilePaths docstring

2020-09-15 Thread Max Reitz
base_dir. Fixes: de263986b5dc Signed-off-by: Nir Soffer Message-Id: <20200828232152.205833-3-nsof...@redhat.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotest

[PULL 00/22] Block patches

2020-09-15 Thread Max Reitz
The following changes since commit 2d2c73d0e3d504a61f868e46e6abd5643f38091b: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200914-1' into staging (2020-09-14 16:03:08 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-

[PULL 01/22] qemu-iotests: Fix FilePaths cleanup

2020-09-15 Thread Max Reitz
From: Nir Soffer If os.remove() fails to remove one of the paths, for example if the file was removed by the test, the cleanup loop would exit silently, without removing the rest of the files. Fixes: de263986b5dc Signed-off-by: Nir Soffer Reviewed-by: Max Reitz Message-Id

Re: [PATCH 1/2] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
On 11.09.20 16:09, Alberto Garcia wrote: > This function preallocates metadata structures and then extends the > image to its new size, but that new size calculation is wrong because > it doesn't take into account that the host_offset variable is always > cluster-aligned. > > This problem can be r

Re: [PATCH] block/rbd: add 'namespace' to qemu_rbd_strong_runtime_opts[]

2020-09-15 Thread Max Reitz
On 14.09.20 21:05, Stefano Garzarella wrote: > Commit 19ae9ae014 ("block/rbd: Add support for ceph namespaces") > introduced namespace support for RBD, but we forgot to add the > new 'namespace' options to qemu_rbd_strong_runtime_opts[]. > > The 'namespace' is used to identify the image, so it is

Re: [PATCH v2] qemu-img: Support bitmap --merge into backing image

2020-09-15 Thread Max Reitz
On 14.09.20 21:10, Eric Blake wrote: > If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a > bitmap from top into base, qemu-img was failing with: > > qemu-img: Could not open 'top.qcow2': Could not open backing file: Failed to > get shared "write" lock > Is another process using

Re: [PATCH 0/2] Make preallocate_co() resize the image to the correct size

2020-09-15 Thread Max Reitz
On 11.09.20 16:09, Alberto Garcia wrote: > preallocate_co() does not resize the image correctly if the original > size was not cluster-aligned. > > This series should be applied on top of Max's block branch (I tested > it with commit 8e66c829eda997dad661d49d73668b1fd3e6043d). > >https://git.x

Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-15 Thread Max Reitz
On 14.09.20 18:42, Alberto Garcia wrote: > On Mon 14 Sep 2020 02:14:36 PM CEST, Max Reitz wrote: > >> However, I wonder what you think about “cluster_offset” in >> qcow2_alloc_host_offset. It isn’t a cluster offset anymore. >> Can/should we rename it? > > That var

[PATCH v3] iotests: Drop readlink -f

2020-09-14 Thread Max Reitz
; pwd" like is done for $source_iotests. Fixes: b1cbc33a3971b6bb005d5ac3569feae35a71de0f ("iotests: Allow running from different directory") Suggested-by: Peter Maydell Reported-by: Claudio Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- tests/qemu-iotests/

Re: [PATCH v2] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 16:26, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 15:17, Max Reitz wrote: >> >> On macOS, (out of the box) readlink does not have -f. If the recent >> "readlink -f" call introduced by b1cbc33a397 fails, just fall back to >> the old behavior

[PATCH v2] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
io Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- v2: Suppress stderr (as requested and suggested by Peter) --- tests/qemu-iotests/check | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e14a1f354d..3c9

Re: [PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 14:51, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 13:32, Max Reitz wrote: >> >> On 14.09.20 14:31, Peter Maydell wrote: >>> On Mon, 14 Sep 2020 at 12:39, Max Reitz wrote: >>>> >>>> On macOS, (out of the box) readlink does not

Re: [PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
On 14.09.20 14:31, Peter Maydell wrote: > On Mon, 14 Sep 2020 at 12:39, Max Reitz wrote: >> >> On macOS, (out of the box) readlink does not have -f. If the recent >> "readlink -f" call introduced by b1cbc33a397 fails, just fall back to >> the old behavior

Re: [PATCH 1/2] qcow2: Make preallocate_co() resize the image to the correct size

2020-09-14 Thread Max Reitz
etadata img.qcow2 128k > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 1 + > tests/qemu-iotests/125 | 40 +- > tests/qemu-iotests/125.out | 28 -- > 3 files changed, 49 insertions(+)

Re: [PATCH 2/2] qcow2: Convert qcow2_alloc_cluster_offset() into qcow2_alloc_host_offset()

2020-09-14 Thread Max Reitz
6 +++--- > block/qcow2-cluster.c | 14 ++ > block/qcow2.c | 36 +--- > 3 files changed, 26 insertions(+), 30 deletions(-) First of all: Reviewed-by: Max Reitz However, I wonder what you think about “cluster_offset” in qcow2_alloc_host_offset. It isn’t

[PATCH] iotests: Work around failing readlink -f

2020-09-14 Thread Max Reitz
udio Fontana Reported-by: Thomas Huth Signed-off-by: Max Reitz --- Hi Thomas, I thought this would be quicker than writing a witty response on whether you or me should write this patch. O:) --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/c

Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash

2020-09-14 Thread Max Reitz
On 14.09.20 12:50, Thomas Huth wrote: > On 14/09/2020 11.19, Max Reitz wrote: >> On 12.09.20 14:14, Thomas Huth wrote: >>> macOS is shipped with a very old version of the bash (3.2), which >>> is currently not suitable for running the iotests anymore. Add >>>

Re: [PATCH] meson: clean up build_by_default

2020-09-14 Thread Max Reitz
On 11.09.20 15:42, Paolo Bonzini wrote: > Build all executables by default except for the known-broken ones. > > This also allows running qemu-iotests without manually building > socket_scm_helper. > > Reported-by: Max Reitz > Signed-off-by: Paolo Bonzini > --- >

Re: [PATCH] qemu-img: Support bitmap --merge into backing image

2020-09-14 Thread Max Reitz
On 11.09.20 17:17, Eric Blake wrote: > On 9/11/20 3:31 AM, Max Reitz wrote: >> On 09.09.20 14:33, Eric Blake wrote: >>> If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a >>> bitmap from top into base, qemu-img was failing with: >>>

Re: [PATCH] tests/check-block: Do not run the iotests with old versions of bash

2020-09-14 Thread Max Reitz
On 12.09.20 14:14, Thomas Huth wrote: > macOS is shipped with a very old version of the bash (3.2), which > is currently not suitable for running the iotests anymore. Add > a check to skip the iotests in this case - if someone still wants > to run the iotests on macOS, they can install a newer vers

Re: [PULL v2 01/46] qemu-iotests: move check-block back to Makefiles

2020-09-11 Thread Max Reitz
On 11.09.20 12:58, Max Reitz wrote: > On 06.09.20 19:53, Paolo Bonzini wrote: >> check-block has its own test harness, unlike every other test. If >> we capture its output, as is in general nicer to do without V=1, >> there will be no sign of progress. So for lack of a bette

Re: [PULL v2 01/46] qemu-iotests: move check-block back to Makefiles

2020-09-11 Thread Max Reitz
On 06.09.20 19:53, Paolo Bonzini wrote: > check-block has its own test harness, unlike every other test. If > we capture its output, as is in general nicer to do without V=1, > there will be no sign of progress. So for lack of a better option > just move the invocation of the test back to Makefil

Re: [PATCH 0/2] block: remove stale runtime_opts

2020-09-11 Thread Max Reitz
On 06.08.20 23:13, John Snow wrote: > > > John Snow (2): > block/rbd: remove runtime_opts > block/qcow: remove runtime opts > > block/qcow.c | 9 - > block/rbd.c | 42 -- > 2 files changed, 51 deletions(-) Thanks, applied to my block branch

Re: [PATCH] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-11 Thread Max Reitz
On 09.09.20 14:37, Alberto Garcia wrote: > This function checks the current status of a (sub)cluster in order to > see if an unaligned 'write zeroes' request can be done efficiently by > simply updating the L2 metadata and without having to write actual > zeroes to disk. > > If the situation does

Re: [PATCH 0/2] Fix error handling in preallocate_co()

2020-09-11 Thread Max Reitz
On 08.09.20 16:08, Alberto Garcia wrote: > This is a follow-up to "Fix removal of list members from > BDRVQcow2State.cluster_allocs": > >https://lists.gnu.org/archive/html/qemu-block/2020-09/msg00247.html > > However the patches themselves are independent and can be applied > separately. > >

Re: [PATCH] qemu-img: Support bitmap --merge into backing image

2020-09-11 Thread Max Reitz
On 09.09.20 14:33, Eric Blake wrote: > If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a > bitmap from top into base, qemu-img was failing with: > > qemu-img: Could not open 'top.qcow2': Could not open backing file: Failed to > get shared "write" lock > Is another process using

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-10 Thread Max Reitz
On 01.09.20 14:51, Peter Lieven wrote: > in case of large continous areas that share the same allocation status > it happens that the value of s->sector_next_status is unaligned to the > cluster size or even request alignment of the source. Avoid this by > stripping down the s->sector_next_status p

Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-10 Thread Max Reitz
On 07.08.20 12:03, Swapnil Ingle wrote: > block/vhdx uses qemu block layer where sector size is always 512 bytes. > This may have issues with 4K logical sector sized vhdx image. > > For e.g qemu-img convert on such images fails with following assert: > > $qemu-img convert -f vhdx -O raw 4KTest1.

Re: [PATCH 29/29] iotests: Test block-export-* QMP interface

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 11 +++- > tests/qemu-iotests/307| 117 ++ > tests/qemu-iotests/307.out| 111 > tests/qemu-iotests/group |

Re: [PATCH 28/29] iotests: Factor out qemu_tool_pipe_and_status()

2020-09-10 Thread Max Reitz
Run a tool and return both its output and its exit code > """ > -subp = subprocess.Popen(qemu_img_args + list(args), > +stderr = subprocess.STDOUT if connect_stderr else None I really despise this notation. It’s like ternary operators in C weren’t bad enough. (Again with the personal feelings. Sorry.) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 27/29] nbd: Deprecate nbd-server-add/remove

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > These QMP commands are replaced by block-export-add/del. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 11 +-- > docs/system/deprecated.rst | 8 > 2 files changed, 17 insertions(+), 2 deletions(-) OK, but: > diff --g

Re: [PATCH 26/29] nbd: Merge nbd_export_new() and nbd_export_create()

2020-09-10 Thread Max Reitz
rs, and another one that actually creates the export. In any case this isn’t the first function in qemu with more than 100 loc and it won’t be the last; and it allows getting rid of two public functions, so: Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 25/29] block/export: Move writable to BlockExportOptions

2020-09-10 Thread Max Reitz
t; qapi/block-export.json | 15 ++- > block/export/export.c | 16 +++- > blockdev-nbd.c | 18 +- > nbd/server.c | 5 - > qemu-nbd.c | 4 ++-- > 5 files changed, 32 insertions(+), 26 deletions(-) Reviewed-by: Ma

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Clients may want to know when an export has finally disappeard > (block-export-del returns earlier than that in the general case), so add > a QAPI event for it. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 12 > block/expo

Re: [PATCH 24/29] block/export: Add query-block-exports

2020-09-10 Thread Max Reitz
hanged, 55 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 23/29] block/export: Create BlockBackend in blk_exp_add()

2020-09-10 Thread Max Reitz
/export/export.c | 49 +++ > blockdev-nbd.c| 33 - > nbd/server.c | 38 +++-- > 4 files changed, 63 insertions(+), 61 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-10 Thread Max Reitz
> block/export/export.c | 2 ++ > tests/qemu-iotests/140.out | 1 + > tests/qemu-iotests/223.out | 4 > 4 files changed, 19 insertions(+) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 19/29] block/export: Move strong user reference to block_exports

2020-09-10 Thread Max Reitz
On 10.09.20 15:33, Max Reitz wrote: > On 07.09.20 20:20, Kevin Wolf wrote: >> The reference owned by the user/monitor that is created when adding the >> export and dropped when removing it was tied to the 'exports' list in >> nbd/server.c. Every block export will ha

Re: [PATCH 19/29] block/export: Move strong user reference to block_exports

2020-09-10 Thread Max Reitz
remember if the user actually still owns it. > > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 8 > block/export/export.c | 6 ++ > blockdev-nbd.c | 5 - > nbd/server.c | 2 -- > 4 files changed, 14 insertions(+), 7 deletions(-)

Re: [PATCH 18/29] block/export: Add 'id' option to block-export-add

2020-09-10 Thread Max Reitz
| 1 + > storage-daemon/qemu-storage-daemon.c | 2 +- > tests/qemu-iotests/223.out | 4 ++-- > 7 files changed, 39 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 17/29] block/export: Add blk_exp_close_all(_type)

2020-09-10 Thread Max Reitz
e(exp); > -g_free(exp); > +/* Touch the block_exports list only in the main thread */ > +aio_bh_schedule_oneshot(qemu_get_aio_context(), blk_exp_delete_bh, > +exp); Looks safe. Reviewed-by: Max Reitz (The effort of s

Re: [PATCH 15/29] block/export: Add node-name to BlockExportOptions

2020-09-10 Thread Max Reitz
s compatibility code would be necessary). > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 27 - > block/monitor/block-hmp-cmds.c | 6 ++--- > blockdev-nbd.c | 44 +- > qemu-nbd.c

Re: [PULL v2] Block layer patches

2020-09-10 Thread Max Reitz
On 10.09.20 11:13, Kevin Wolf wrote: > Am 10.09.2020 um 00:09 hat Eric Blake geschrieben: >> On 9/9/20 4:55 PM, Peter Maydell wrote: >> >>> >>> This fails 'make check' on NetBSD and OpenBSD: >>> >>> ./check: line 47: realpath: command not found >>> ./check: line 60: /common.env: No such file or dir

Re: [PATCH 14/29] block/export: Move AioContext from NBDExport to BlockExport

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 3 +++ > block/export/export.c | 2 ++ > nbd/server.c | 26 +- > 3 files changed, 18 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 09/29] nbd: Add writethrough to block-export-add

2020-09-10 Thread Max Reitz
api/block-export.json | 7 ++- > blockdev-nbd.c | 6 +- > 2 files changed, 11 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 07/29] block/export: Remove magic from block-export-add

2020-09-10 Thread Max Reitz
| 3 +-- > 6 files changed, 67 insertions(+), 21 deletions(-) [...] > +if (bdrv_is_read_only(bs)) { > +export_opts.u.nbd.has_writable = true; Ah, yes, setting that might be nice. :) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH 04/29] block/export: Add BlockExport infrastructure and block-export-add

2020-09-10 Thread Max Reitz
ck/meson.build| 2 ++ > meson.build | 2 +- > 9 files changed, 133 insertions(+), 10 deletions(-) > create mode 100644 include/block/export.h > create mode 100644 block/export/export.c > create mode 100644 block/export/meson.build Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

[PATCH 8/8] tests/acceptance: Add virtiofs_submounts.py

2020-09-09 Thread Max Reitz
point, virtiofsd requires them. (If you have a timestamp_timeout period for sudoers (e.g. the default of 5 min), you can provide this by executing something like "sudo true" before invoking Avocado.) Signed-off-by: Max Reitz --- tests/acceptance/virtiofs_submounts.

[PATCH 6/8] virtiofsd: Announce sub-mount points

2020-09-09 Thread Max Reitz
the current behavior, so that the guest learns nothing about the host mount structure. Signed-off-by: Max Reitz --- tools/virtiofsd/helper.c | 1 + tools/virtiofsd/passthrough_ll.c | 67 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a

[PATCH 4/8] virtiofsd: Add fuse_reply_attr_with_flags()

2020-09-09 Thread Max Reitz
The plain fuse_reply_attr() function does not allow setting fuse_attr.flags, so add this new function that does. Make fuse_reply_attr() a wrapper around it. Signed-off-by: Max Reitz --- tools/virtiofsd/fuse_lowlevel.h | 15 +++ tools/virtiofsd/fuse_lowlevel.c | 14 -- 2

[PATCH 7/8] tests/acceptance/boot_linux: Accept SSH pubkey

2020-09-09 Thread Max Reitz
Let download_cloudinit() take an optional pubkey, which subclasses of BootLinux can pass through setUp(). Signed-off-by: Max Reitz --- tests/acceptance/boot_linux.py | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/boot_linux.py b/tests

[PATCH 3/8] virtiofsd: Add attr_flags to fuse_entry_param

2020-09-09 Thread Max Reitz
fuse_entry_param is converted to fuse_attr on the line (by fill_entry()), so it should have a member that mirrors fuse_attr.flags. fill_entry() should then copy this fuse_entry_param.attr_flags to fuse_attr.flags. Signed-off-by: Max Reitz --- tools/virtiofsd/fuse_lowlevel.h | 5 + tools

[PATCH 5/8] virtiofsd: Store every lo_inode's parent_dev

2020-09-09 Thread Max Reitz
e of simplicity let us ignore any non-directory mount points for now. Signed-off-by: Max Reitz --- tools/virtiofsd/passthrough_ll.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 784330e0e4..2c48c03b

[PATCH 2/8] virtiofsd: Announce FUSE_ATTR_FLAGS

2020-09-09 Thread Max Reitz
The fuse_attr.flags field is currently just initialized to 0, which is valid. Thus, there is no reason not to always announce FUSE_ATTR_FLAGS (when the kernel supports it). Signed-off-by: Max Reitz --- tools/virtiofsd/fuse_common.h | 8 tools/virtiofsd/fuse_lowlevel.c | 7 +++ 2

[PATCH 1/8] linux/fuse.h: Pull in from Linux

2020-09-09 Thread Max Reitz
Update the linux/fuse.h standard header from the kernel development tree that implements FUSE submounts. This adds the fuse_attr.flags field, the FUSE_ATTR_FLAGS INIT flag, and the FUSE_ATTR_SUBMOUNT flag for fuse_attr.flags. Signed-off-by: Max Reitz --- include/standard-headers/linux/fuse.h

[PATCH 0/8] virtiofsd: Announce submounts to the guest

2020-09-09 Thread Max Reitz
you have a structure A/B/C/D, where each is a mount point, then unmounting D, C, and B in the guest will allow the host to unmount D and C.) Max Reitz (8): linux/fuse.h: Pull in from Linux virtiofsd: Announce FUSE_ATTR_FLAGS virtiofsd: Add attr_flags to fuse_entry_param virtiofsd: Add

Re: [PULL 00/64] Block layer patches

2020-09-08 Thread Max Reitz
On 08.09.20 09:01, Kevin Wolf wrote: > Am 07.09.2020 um 22:22 hat Peter Maydell geschrieben: >> On Mon, 7 Sep 2020 at 12:09, Kevin Wolf wrote: >>> >>> The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4: >>> >>> Merge remote-tracking branch >>> 'remotes/kraxel/tags/ui-20

Re: [PATCH v8 6/7] block-stream: freeze link to base node during stream job

2020-09-07 Thread Max Reitz
On 04.09.20 15:48, Vladimir Sementsov-Ogievskiy wrote: > 04.09.2020 16:21, Max Reitz wrote: >> On 28.08.20 18:52, Andrey Shinkevich wrote: >>> To keep the base node unchanged during the block-stream operation, >>> freeze it as the other part of the backing chain with

Re: [PATCH v2] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-07 Thread Max Reitz
On 07.09.20 13:38, Thomas Huth wrote: > The test_stream_parallel test still occasionally fails in the CI. > Thus let's disable it during "make check" for now so that it does > not cause trouble during merge tests. We can enable it again once > the problem has been resolved. > > Signed-off-by: Thom

Re: [PATCH] file-win32: Fix "locking" option

2020-09-07 Thread Max Reitz
f-by: Kevin Wolf > --- > block/file-win32.c | 22 +- > 1 file changed, 21 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [PATCH v2] qemu-img: Explicit number replaced by a constant

2020-09-07 Thread Max Reitz
On 19.08.20 03:36, Yi Li wrote: > Signed-off-by: Yi Li > --- > qemu-img.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block signature.asc Description: OpenPGP digital signature

Re: [PATCH] iotests: Skip test_stream_parallel in test 030 when doing "make check"

2020-09-07 Thread Max Reitz
On 05.09.20 13:24, Thomas Huth wrote: > The test_stream_parallel test still occasionally fails in the CI. > Thus let's disable it during "make check" for now so that it does > not cause trouble during merge tests. We can enable it again once > the problem has been resolved. > > Signed-off-by: Thom

Re: [PATCH v8 7/7] block: apply COR-filter to block-stream jobs

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > This patch completes the series with the COR-filter insertion for > block-stream operations. Adding the filter makes it possible for copied > regions to be discarded in backing files during the block-stream job, > what will reduce the disk overuse. > Th

Re: [PATCH v8 6/7] block-stream: freeze link to base node during stream job

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > To keep the base node unchanged during the block-stream operation, > freeze it as the other part of the backing chain with the intermediate > nodes related to the job. > This patch revers the change made with the commit c624b015bf as the > correct base

Re: [PATCH v8 5/7] copy-on-read: limit guest writes to base in COR driver

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > Limit the guest's COR operations by the base node in the backing chain > during a stream job. I don’t understand. Shouldn’t we limit the areas where we set the COR flag? > Signed-off-by: Andrey Shinkevich > --- > block/copy-on-read.c | 49

Re: [PATCH v8 4/7] copy-on-read: pass base file name to COR driver

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > To limit the guest's COR operations by the base node in the backing > chain during stream job, pass the base file name to the copy-on-read Does it have to be a filename? That sounds really bad to me. > driver. The rest of the functionality will be im

Re: [PATCH v8 2/7] copy-on-read: add filter append/drop functions

2020-09-04 Thread Max Reitz
On 28.08.20 18:52, Andrey Shinkevich wrote: > Provide API for the COR-filter insertion/removal. Hm. Why? I see the implementation is just bdrv_open() + bdrv_replace_node(), which is what I would have expected. Why can’t the caller just do that? Or maybe it would even make sense to just make it

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 12:14, Thomas Huth wrote: > On 04/09/2020 10.25, Kevin Wolf wrote: >> Am 04.09.2020 um 07:57 hat Thomas Huth geschrieben: >>> Test 030 is still occasionally failing in the CI ... so for the >>> time being, let's disable it in the "auto" group. We can add it >>> back once it got more sta

Re: [PATCH v2 3/3] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-04 Thread Max Reitz
On 04.09.20 11:36, Alberto Garcia wrote: > On Fri 04 Sep 2020 11:28:18 AM CEST, Max Reitz wrote: >>> + * If any clusters or subclusters were allocated then @m contains a >>> + * list with the information of all the affected regions. Note that >>> + * this can hap

Re: [PATCH v2 0/3] qcow2: Fix removal of list members from BDRVQcow2State.cluster_allocs

2020-09-04 Thread Max Reitz
On 03.09.20 18:37, Alberto Garcia wrote: > Hi, > > here are the changes from v1: > > - Split changes into three different patches. > - Rewrite the documentation of qcow2_alloc_cluster_offset() [Max] > - Use peek_file_be in the test case to read the offset of the refcount > table [Max]. > - Exte

Re: [PATCH v2 3/3] qcow2: Rewrite the documentation of qcow2_alloc_cluster_offset()

2020-09-04 Thread Max Reitz
On 03.09.20 18:37, Alberto Garcia wrote: > The current text corresponds to an earlier, simpler version of this > function and it does not explain how it works now. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 24 ++-- > 1 file changed, 14 insertions(+), 1

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 10:31, Max Reitz wrote: > On 04.09.20 07:57, Thomas Huth wrote: >> Test 030 is still occasionally failing in the CI ... so for the >> time being, let's disable it in the "auto" group. We can add it >> back once it got more stable. >> >> S

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-04 Thread Max Reitz
On 04.09.20 07:57, Thomas Huth wrote: > Test 030 is still occasionally failing in the CI ... so for the > time being, let's disable it in the "auto" group. We can add it > back once it got more stable. > > Signed-off-by: Thomas Huth > --- > I just saw the problem here: > https://cirrus-ci.com/

Re: [PATCH] qcow2: Use macros for the L1, refcount and bitmap table entry sizes

2020-09-03 Thread Max Reitz
On 28.08.20 13:08, Alberto Garcia wrote: > This patch replaces instances of sizeof(uint64_t) in the qcow2 driver > with macros that indicate what those sizes are actually referring to. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.h | 6 +++ > block/qcow2-bitmap.c | 11 --

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-03 Thread Max Reitz
On 01.09.20 14:51, Peter Lieven wrote: > in case of large continous areas that share the same allocation status > it happens that the value of s->sector_next_status is unaligned to the > cluster size or even request alignment of the source. Avoid this by > stripping down the s->sector_next_status p

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-09-03 Thread Max Reitz
On 03.09.20 15:36, Fabian Grünbichler wrote: > On September 3, 2020 3:23 pm, Kevin Wolf wrote: >> Am 03.09.2020 um 14:57 hat Max Reitz geschrieben: >>> On 03.09.20 14:38, Kevin Wolf wrote: >>>> Am 03.09.2020 um 13:04 hat Max Reitz geschrieben: >>>>>

<    6   7   8   9   10   11   12   13   14   15   >