Re: [PATCH] iotests: fix _check_o_direct

2020-12-22 Thread Max Reitz
On 18.12.20 19:20, Vladimir Sementsov-Ogievskiy wrote: Unfortunately commit "iotests: handle tmpfs" break running iotests with -nbd -nocache, as _check_o_direct tries to create $TEST_IMG.test_o_direct, but in case of nbd TEST_IMG is smothing like nbd+unix:///... , and test fails with message

Re: virtiofsd: sshfs as submount?

2020-12-21 Thread Max Reitz
On 21.12.20 13:45, Laszlo Ersek wrote: On 12/21/20 13:06, Max Reitz wrote: I can share sshfs through sshfs, so it must be something virtiofs-specific. Your insight proved crucial to solving the riddle. Chaining sshfs with sshfs made me think that you must have used a normal (non-root) user

Re: virtiofsd: sshfs as submount?

2020-12-21 Thread Max Reitz
On 20.12.20 00:41, Laszlo Ersek wrote: Hi Miklos, (I hope it’s OK for me not to be Miklos, even though I don’t have much to add) the following 2019 presentation on Stefan's website: https://vmsplice.net/ virtio-fs: A Shared File System for Virtual Machines at KVM Forum 2019 https

[PULL 29/30] iotests/102: Pass $QEMU_HANDLE to _send_qemu_cmd

2020-12-18 Thread Max Reitz
The first parameter passed to _send_qemu_cmd is supposed to be the $QEMU_HANDLE. 102 does not do so here, fix it. As a result, the output changes: Now we see the prompt this command is supposedly waiting for before the resize message - as it should be. Signed-off-by: Max Reitz Message-Id

[PULL 28/30] block/nvme: Implement fake truncate() coroutine

2020-12-18 Thread Max Reitz
() coroutine, similarly how it is done for the iscsi and file-posix drivers (see commit 82325ae5f2f "Evaluate @exact in protocol drivers"). Reported-by: Xueqiang Wei Suggested-by: Max Reitz Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20201210125202.858656-1-phi...@redhat.com> Si

[PULL 24/30] simplebench/results_to_text: make executable

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Make results_to_text a tool to dump results saved in JSON file. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-21-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simpl

[PULL 27/30] quorum: Implement bdrv_co_pwrite_zeroes()

2020-12-18 Thread Max Reitz
Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/quorum.c | 36 ++-- tests/qemu-iotests/312 | 11 +++ tests/qemu-iotests/312.out | 8 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/block/quorum.c b/block

[PULL 23/30] simplebench/results_to_text: add difference line to the table

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Performance improvements / degradations are usually discussed in percentage. Let's make the script calculate it for us. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-20-vsement...@virtuozzo.com> Reviewed-by: Max Rei

[PULL 21/30] simplebench: move results_to_text() into separate file

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Let's keep view part in separate: this way it's better to improve it in the following commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-18-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-o

[PULL 25/30] scripts/simplebench: add bench_prealloc.py

2020-12-18 Thread Max Reitz
use new preallocate filter with qcow2 image. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-22-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simplebench/bench_prealloc.py | 132 ++ 1 file c

[PULL 22/30] simplebench/results_to_text: improve view of the table

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move to generic format for floats and percentage for error. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-19-vsement...@virtuozzo.com> Acked-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simplebench/results_to_t

[PULL 20/30] simplebench: rename ascii() to results_to_text()

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Next patch will use utf8 plus-minus symbol, let's use more generic (and more readable) name. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-17-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by

[PULL 30/30] iotests: Fix _send_qemu_cmd with bash 5.1

2020-12-18 Thread Max Reitz
we can also just not use array slicing and replace the whole thing with a simple "cmd=$1; shift", which works because all callers quote the whole $cmd argument anyway. Signed-off-by: Max Reitz Message-Id: <20201217153803.101231-3-mre...@redhat.com> Reviewed-by: Kevin Wolf --- t

[PULL 15/30] iotests.py: execute_setup_common(): add required_fmts argument

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Add a parameter to skip test if some needed additional formats are not supported (for example filter drivers). Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-12-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-

[PULL 26/30] quorum: Implement bdrv_co_block_status()

2020-12-18 Thread Max Reitz
y: Alberto Garcia Tested-by: Tao Xu Reviewed-by: Max Reitz Message-Id: Signed-off-by: Max Reitz --- block/quorum.c | 52 + tests/qemu-iotests/312 | 148 + tests/qemu-iotests/312.out | 67 + tests/qemu-iotests/gro

[PULL 12/30] block: introduce preallocate filter

2020-12-18 Thread Max Reitz
ssage-Id: <20201021145859.11201-9-vsement...@virtuozzo.com> Reviewed-by: Max Reitz [mreitz: Two comment fixes, and bumped the version from 5.2 to 6.0] Signed-off-by: Max Reitz --- docs/system/qemu-block-drivers.rst.inc | 26 ++ qapi/block-core.json | 20 +- block/pr

[PULL 19/30] scripts/simplebench: use standard deviation for +- error

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Standard deviation is more usual to see after +- than current maximum of deviations. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-16-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- s

[PULL 17/30] scripts/simplebench: fix grammar: s/successed/succeeded/

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-14-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simplebench/simplebench.py | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[PULL 18/30] scripts/simplebench: support iops

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Support benchmarks returning not seconds but iops. We'll use it for further new test. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-15-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz -

[PULL 05/30] block: simplify comment to BDRV_REQ_SERIALISING

2020-12-18 Thread Max Reitz
com> Signed-off-by: Max Reitz --- include/block/block.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 5b81e33e94..a3f3dcc88f 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -63,16

[PULL 14/30] iotests: qemu_io_silent: support --image-opts

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20201021145859.11201-11-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-)

[PULL 11/30] block: bdrv_check_perm(): process children anyway

2020-12-18 Thread Max Reitz
sement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index b57421a969..64412ee7de 100644 --- a/block.c +++ b/block.c @@ -2028,8 +2028,11 @@ static int bdrv_check

[PULL 09/30] block: bdrv_mark_request_serialising: split non-waiting function

2020-12-18 Thread Max Reitz
mentsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20201021145859.11201-6-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- include/block/block_int.h | 3 ++- block/file-posix.c| 2 +- block/io.c| 35 +++ 3 files changed, 26

[PULL 16/30] iotests: add 298 to test new preallocate filter driver

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-13-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/298 | 186 + tests/qemu-iotests/2

[PULL 10/30] block: introduce BDRV_REQ_NO_WAIT flag

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Add flag to make serialising request no wait: if there are conflicting requests, just return error immediately. It's will be used in upcoming preallocate filter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Messa

[PULL 08/30] block/io: bdrv_wait_serialising_requests_locked: drop extra bs arg

2020-12-18 Thread Max Reitz
uot;_locked" is. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Message-Id: <20201021145859.11201-5-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- block/io.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/io.c b/b

[PULL 03/30] block: bdrv_child_set_perm() drop redundant parameters.

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We must set the permission used for _check_. Assert that we have backup and drop extra arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201106124241.16950-7-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max

[PULL 06/30] block/io.c: drop assertion on double waiting for request serialisation

2020-12-18 Thread Max Reitz
ge-Id: <20201021145859.11201-3-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- block/io.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/block/io.c b/block/io.c index 24205f5168..27370107b2 100644 --- a/block/io.c +++ b/block/io.c @@ -1827,7 +1827,6 @@ bdrv_co_write_

[PULL 13/30] qemu-io: add preallocate mode parameter for truncate command

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy This will be used in further test. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-Id: <20201021145859.11201-10-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- qemu-io-cmds.

[PULL 04/30] block: drop tighten_restrictions

2020-12-18 Thread Max Reitz
uozzo.com> [mreitz: Fixed rebase conflict] Signed-off-by: Max Reitz --- block.c | 89 +++-- 1 file changed, 17 insertions(+), 72 deletions(-) diff --git a/block.c b/block.c index f66388b9ea..b57421a969 100644 --- a/block.c +++ b/block

[PULL 07/30] block/io: split out bdrv_find_conflicting_request

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy To be reused in separate. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Message-Id: <20201021145859.11201-4-vsement...@virtuozzo.com> Signed-off-by: Max Reitz --- block/io.

[PULL 01/30] block: add bdrv_refresh_perms() helper

2020-12-18 Thread Max Reitz
off-by: Max Reitz --- block.c | 61 + 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/block.c b/block.c index 8f177504d4..3a07693608 100644 --- a/block.c +++ b/block.c @@ -2327,6 +2327,24 @@ static void bdrv_child_abort_perm_

[PULL 02/30] block: bdrv_set_perm() drop redundant parameters.

2020-12-18 Thread Max Reitz
obvious. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201106124241.16950-6-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/block.c b/b

[PULL 00/30] Block patches

2020-12-18 Thread Max Reitz
d iscsi devices - Block layer refactoring: Drop the tighten_restrictions concept in the block permission functions - iotest fixes Alberto Garcia (2): quorum: Implement bdrv_co_block_status() quorum: Implement bdrv_co_pwrite_zeroes(

Re: [PATCH 1/9] block/vpc: Make vpc_open() read the full dynamic header

2020-12-18 Thread Max Reitz
On 18.12.20 14:49, Markus Armbruster wrote: Max Reitz writes: On 17.12.20 17:19, Markus Armbruster wrote: The dynamic header's size is 1024 bytes. vpc_open() reads only the 512 bytes of the dynamic header into buf[]. Works, because it doesn't actually access the second half.

Re: [PATCH 9/9] block/vpc: Use sizeof() instead of HEADER_SIZE for footer size

2020-12-18 Thread Max Reitz
On 17.12.20 17:20, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- block/vpc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 8/9] block/vpc: Pass footer buffers as VHDFooter * instead of uint8_t *

2020-12-18 Thread Max Reitz
On 17.12.20 17:20, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- block/vpc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz (Some mumbling about const pointers in the distance)

Re: [PATCH 6/9] block/vpc: Use sizeof() instead of 1024 for dynamic header size

2020-12-18 Thread Max Reitz
On 17.12.20 17:20, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- block/vpc.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 4/9] block/vpc: Make vpc_checksum() take void *

2020-12-18 Thread Max Reitz
vpc_checksum(void *p, size_t size) { +uint8_t *buf = p; uint32_t res = 0; int i; Using this opportunity to add consts would be nice, but not necessary: Reviewed-by: Max Reitz

Re: [PATCH 3/9] block/vpc: Don't abuse the footer buffer for dynamic header

2020-12-18 Thread Max Reitz
_fn vpc_co_create(BlockdevCreateOptions *opts, } /* Prepare the Hard Disk Footer */ -memset(buf, 0, 1024); +memset(footer_buf, 0, HEADER_SIZE); memcpy(footer->creator, "conectix", 8); Same here, except here it’s patch 7. Reviewed-by: Max Reitz

Re: [PATCH 5/9] block/vpc: Pad VHDDynDiskHeader, replace uint8_t[] buffers

2020-12-18 Thread Max Reitz
vpc.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 7/9] block/vpc: Pad VHDFooter, replace uint8_t[] buffers

2020-12-18 Thread Max Reitz
rd%20Disk%20Format%20Spec_10_18_06.doc Signed-off-by: Markus Armbruster --- block/vpc.c | 77 + 1 file changed, 37 insertions(+), 40 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 2/9] block/vpc: Don't abuse the footer buffer as BAT sector buffer

2020-12-18 Thread Max Reitz
changed, 3 insertions(+), 2 deletions(-) (Still wondering about whether such buffers should go on the stack, but:) Reviewed-by: Max Reitz

Re: [PATCH 1/9] block/vpc: Make vpc_open() read the full dynamic header

2020-12-18 Thread Max Reitz
_setg(errp, "Error reading dynamic VHD header"); goto fail; } -dyndisk_header = (VHDDynDiskHeader *) buf; +dyndisk_header = (VHDDynDiskHeader *)dyndisk_header_buf; if (strncmp(dyndisk_header->magic, "cxsparse", 8)) { error_setg(errp, "Invalid header magic"); Reviewed-by: Max Reitz

[PATCH v2 1/2] iotests/102: Pass $QEMU_HANDLE to _send_qemu_cmd

2020-12-17 Thread Max Reitz
The first parameter passed to _send_qemu_cmd is supposed to be the $QEMU_HANDLE. 102 does not do so here, fix it. As a result, the output changes: Now we see the prompt this command is supposedly waiting for before the resize message - as it should be. Signed-off-by: Max Reitz --- tests/qemu

[PATCH v2 2/2] iotests: Fix _send_qemu_cmd with bash 5.1

2020-12-17 Thread Max Reitz
we can also just not use array slicing and replace the whole thing with a simple "cmd=$1; shift", which works because all callers quote the whole $cmd argument anyway. Signed-off-by: Max Reitz --- tests/qemu-iotests/085.out | 167 - tests/qemu-iotest

[PATCH v2 0/2] Fix _send_qemu_cmd with bash 5.1

2020-12-17 Thread Max Reitz
102 in how it calls _send_qemu_cmd. (This becomes really visible with the change in patch 2.) Comparing patch 2 to v1 (“iotests: Quote $cmd in _send_qemu_cmd”), the reference output diffs haven’t changed, only the common.qemu hunk is different. Max Reitz (2): iotests/102: Pass $QEMU_HANDLE to

Re: [PATCH] iotests: Quote $cmd in _send_qemu_cmd

2020-12-15 Thread Max Reitz
On 15.12.20 16:49, Kevin Wolf wrote: [...] Ah, looks like you don't even need to quote it like cmd="$1"? Maybe I should learn bash sometime... No, normally you don’t, which is the reason why the "cmd=${$@: x:y}" line wasn’t quoted so far. (Probably a bug in bash that was then fixed in 5.1.

Re: [PATCH] iotests: Quote $cmd in _send_qemu_cmd

2020-12-15 Thread Max Reitz
On 15.12.20 12:43, Kevin Wolf wrote: Am 14.12.2020 um 18:58 hat Max Reitz geschrieben: With bash 5.1, the output of the following script (which creates an array with a single element, then takes a single-element slice from that array, and echos the result) changes: a=("double space&q

[PATCH] iotests: Quote $cmd in _send_qemu_cmd

2020-12-14 Thread Max Reitz
ive whitespaces in their _send_qemu_cmd parameters.) Signed-off-by: Max Reitz --- Alternatively, we could explicitly collapse all whitespace sequences into single spaces, but I believe that would defeat the purpose of "accomodat[ing] pathnames with spaces". I used this script to veri

[PATCH] iotests/210: Fix reference output

2020-12-14 Thread Max Reitz
Commit 8b1170012b1 has added a global maximum disk length for the block layer, so the error message when creating an overly large disk has changed. Fixes: 8b1170012b1de6649c66ac1887f4df7e312abf3b ("block: introduce BDRV_MAX_LENGTH") Signed-off-by: Max Reitz --- tests/qemu-iotes

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Max Reitz
On 11.12.20 18:42, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 20:24, Max Reitz wrote: On 11.12.20 17:50, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 19:05, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we t

Re: [PATCH v14 13/13] block: apply COR-filter to block-stream jobs

2020-12-11 Thread Max Reitz
t seemed a bit strange to me at first, but on second thought, it makes more sense. Doing anything else would produce a garbage result basically, because stream_run() doesn’t take such a change into account. So... After all I think I agree with setting @bottom unconditionally. And that’s the only comment I had. :) Reviewed-by: Max Reitz

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Max Reitz
On 11.12.20 17:50, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 19:05, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we try to make it prepared for the situation when base node is changed during the operation. In

Re: [PATCH v14 12/13] block/stream: add s->target_bs

2020-12-11 Thread Max Reitz
/stream.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v14 11/13] iotests: 30: prepare to COR filter insertion by stream job

2020-12-11 Thread Max Reitz
. Correct thing to do is move to new interface: "bottom" argument instead of base. This guarantees that jobs don't intersect by their actions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/030 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we try to make it prepared for the situation when base node is changed during the operation. In other words, block-stream doesn't own base node. Let's introduce a new interface which should replace

Re: [PATCH v14 09/13] stream: skip filters when writing backing file name to QCOW2 header

2020-12-11 Thread Max Reitz
mply that we might end up with a case where base != NULL, but base_id == NULL. Anyway: Reviewed-by: Max Reitz +base_id = base_unfiltered->filename; +if (base_unfiltered->drv) { +

Re: [PATCH v14 08/13] copy-on-read: skip non-guest reads if no copy needed

2020-12-11 Thread Max Reitz
Sementsov-Ogievskiy --- include/block/block.h | 8 +--- block/copy-on-read.c | 14 ++ 2 files changed, 15 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v14 06/13] iotests: add #310 to test bottom node in COR driver

2020-12-11 Thread Max Reitz
On 11.12.20 14:10, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 15:49, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich The test case #310 is similar to #216 by Max Reitz. The difference is that the test #310 involves a bottom node to the COR

Re: [PATCH v14 07/13] block: include supported_read_flags into BDS structure

2020-12-11 Thread Max Reitz
} I’d prefer an assert(!(flags & ~bs->supported_read_flags)), so in case we do abort, there’s going to be an error message that immediately tells what the problem is. Apart from that: Reviewed-by: Max Reitz + max_bytes = ROUND_UP(MAX(0, total_bytes - offset), align); if (byte

Re: [PATCH v14 06/13] iotests: add #310 to test bottom node in COR driver

2020-12-11 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich The test case #310 is similar to #216 by Max Reitz. The difference is that the test #310 involves a bottom node to the COR filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v14 05/13] qapi: create BlockdevOptionsCor structure for COR driver

2020-12-11 Thread Max Reitz
On 10.12.20 19:30, Vladimir Sementsov-Ogievskiy wrote: 10.12.2020 20:43, Max Reitz wrote: I don’t like this patch’s subject very much, because I find the implementation of the @bottom option to be more noteworthy than the addition of the QAPI structure. On 04.12.20 23:07, Vladimir Sementsov

Re: [PATCH v14 04/13] qapi: add filter-node-name to block-stream

2020-12-10 Thread Max Reitz
easily visually separable from other parameters) if they’re indented. I understand that two other parameters’ descriptions aren’t indented either (but one is), so in the end it’s your choice. (But I thought a little nudging couldn’t hurt.) So either way (with *6.0): Reviewed-by: Max Reitz

Re: [PATCH v14 05/13] qapi: create BlockdevOptionsCor structure for COR driver

2020-12-10 Thread Max Reitz
ame to the COR driver. The bottom node is the first non-filter overlay of the base. It was introduced because the base node itself may change due to possible concurrent jobs. Suggested-by: Max Reitz Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich [vseme

Re: [PATCH v14 03/13] copy-on-read: add filter drop function

2020-12-10 Thread Max Reitz
: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.h | 32 + block/copy-on-read.c | 56 2 files changed, 88 insertions(+) create mode 100644 block/copy-on-read.h Reviewed-by: Max Reitz

Re: [PATCH v14 02/13] block: add API function to insert a node

2020-12-10 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich Provide API for insertion a node to backing chain. Suggested-by: Max Reitz Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c

Re: [PATCH] block/nvme: Implement fake truncate() coroutine

2020-12-10 Thread Max Reitz
implement the NVMe truncate() coroutine, similarly how it is done for the iscsi and file-posix drivers (see commit 82325ae5f2f "Evaluate @exact in protocol drivers"). Reported-by: Xueqiang Wei Suggested-by: Max Reitz Signed-off-by: Philippe Mathieu-Daudé --- block/n

[PATCH] iotests/221: Discard image before qemu-img map

2020-12-07 Thread Max Reitz
). Suggested-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/221 | 7 +++ tests/qemu-iotests/221.out | 14 ++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221 index 0e9096fec7..73c45a4ca6 100755

[Bug 498523] Re: Add on-line write compression support to qcow2

2020-11-30 Thread Max Reitz
The compression filter can be used e.g. with -drive driver=compress,file.driver=qcow2,file.file.filename=foo.qcow2. However, it shouldn’t be used lightly, as it will only do the right thing in very specific circumstances, namely every cluster that’s written to must not be allocated already. So wri

[PATCH 1/3] quorum: Require WRITE perm with rewrite-corrupted

2020-11-13 Thread Max Reitz
Using rewrite-corrupted means quorum may issue writes to its children just from receiving read requests from its parents. Thus, it must take the WRITE permission when rewrite-corrupted is used. Signed-off-by: Max Reitz --- block/quorum.c | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH 3/3] iotests/081: Test rewrite-corrupted without WRITE

2020-11-13 Thread Max Reitz
Test what happens when a rewrite-corrupted quorum node performs such a rewrite, while there is no parent that has taken the WRITE permission. Signed-off-by: Max Reitz --- tests/qemu-iotests/081 | 54 ++ tests/qemu-iotests/081.out | 27

[PATCH 0/3] quorum: Require WRITE perm with rewrite-corrupted

2020-11-13 Thread Max Reitz
looks to me like this bug has existed for quite some time, so I don’t think this series must go into 5.2. OTOH, it’s a simple bug fix, so I suppose it might as well. Max Reitz (3): quorum: Require WRITE perm with rewrite-corrupted iotests/081: Filter image format after testdir iotests/081

[PATCH 2/3] iotests/081: Filter image format after testdir

2020-11-13 Thread Max Reitz
Otherwise, this breaks whenever the test directory contains the image format (e.g. "/tmp/test-raw-file" is filtered to "/tmp/test-IMGFMT-file" instead of "TEST_DIR"). Signed-off-by: Max Reitz --- tests/qemu-iotests/081 | 7 --- 1 file changed, 4 insertions(+)

Re: [PATCH v4 2/2] quorum: Implement bdrv_co_pwrite_zeroes()

2020-11-13 Thread Max Reitz
36 ++-- tests/qemu-iotests/312 | 11 +++ tests/qemu-iotests/312.out | 8 3 files changed, 53 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz @@ -897,6 +910,21 @@ static QemuOptsList quorum_runtime_opts = { }, }; +static void quorum_refresh_flags(BlockDriverSt

Re: [PATCH v4 0/2] quorum: Implement bdrv_co_block_status()

2020-11-13 Thread Max Reitz
On 13.11.20 17:52, Alberto Garcia wrote: Following Max's suggestion, this version sets supported_zero_flags. Berto v4: - Set supported_zero_flags in quorum [Max] - Update test to verify the data written before doing 'write -z' [Max] v3: https://lists.gnu.org/archive/html/qemu-block/2020-11/msg

Re: [PATCH v7 00/21] preallocate filter

2020-11-13 Thread Max Reitz
On 21.10.20 16:58, Vladimir Sementsov-Ogievskiy wrote: Hi all! Here is a filter, which does preallocation on write. v7: 01: add Alberto's r-b 07: don't remove sentence from the comment 08: - drop extra "s->file_end = end;" line - improve check/set perm handlers 09: add Max's r-b 10: add Ma

Re: [PATCH v7 21/21] scripts/simplebench: add bench_prealloc.py

2020-11-13 Thread Max Reitz
On 13.11.20 19:00, Vladimir Sementsov-Ogievskiy wrote: 13.11.2020 19:24, Max Reitz wrote: On 21.10.20 16:58, Vladimir Sementsov-Ogievskiy wrote: Benchmark for new preallocate filter. Example usage: ./bench_prealloc.py ../../build/qemu-img \ ssd-ext4:/path/to/mount/point

Re: [PATCH v3 2/2] quorum: Implement bdrv_co_pwrite_zeroes()

2020-11-13 Thread Max Reitz
On 13.11.20 17:26, Alberto Garcia wrote: On Fri 13 Nov 2020 05:11:20 PM CET, Max Reitz wrote: We could set all supported_zero_flags as long as all children support them, right? Sure, I was just thinking that we could set these regardless of whether the children support them, because (on zero

Re: [PATCH v7 21/21] scripts/simplebench: add bench_prealloc.py

2020-11-13 Thread Max Reitz
: Max Reitz

Re: [PATCH v7 20/21] simplebench/results_to_text: make executable

2020-11-13 Thread Max Reitz
755 scripts/simplebench/results_to_text.py Reviewed-by: Max Reitz

Re: [PATCH v7 19/21] simplebench/results_to_text: add difference line to the table

2020-11-13 Thread Max Reitz
ell += f' {col_j}{diff_pr:+}%' Contrasting to v6, you added the "cell += ' '" line, dropped a space in the "cell += '--'" line (was: "cell += ' --'"), but kept the space here. I would have assumed that the leading space is drop

Re: [PATCH v3 2/2] quorum: Implement bdrv_co_pwrite_zeroes()

2020-11-13 Thread Max Reitz
On 13.11.20 17:07, Alberto Garcia wrote: On Fri 13 Nov 2020 12:49:04 PM CET, Max Reitz wrote: On 11.11.20 17:53, Alberto Garcia wrote: This simply calls bdrv_co_pwrite_zeroes() in all children Signed-off-by: Alberto Garcia --- block/quorum.c | 18 -- tests

Re: [PATCH v7 18/21] simplebench/results_to_text: improve view of the table

2020-11-13 Thread Max Reitz
lly agree is an improvement), I can’t really give an R-b. Perhaps this is OK: Acked-by: Max Reitz def result_to_text(result): """Return text representation of bench_one() returned dict.""" if 'average' in result: -s = '{:.2f} +- {

Re: [PATCH v7 17/21] simplebench: move results_to_text() into separate file

2020-11-13 Thread Max Reitz
eq.py | 3 +- scripts/simplebench/results_to_text.py | 48 ++ scripts/simplebench/simplebench.py | 31 - 4 files changed, 52 insertions(+), 33 deletions(-) create mode 100644 scripts/simplebench/results_to_text.py Reviewed-by: Max Reitz

Re: [PATCH v7 15/21] scripts/simplebench: use standard deviation for +- error

2020-11-13 Thread Max Reitz
(-) Reviewed-by: Max Reitz

Re: [PATCH v7 16/21] simplebench: rename ascii() to results_to_text()

2020-11-13 Thread Max Reitz
| 2 +- scripts/simplebench/simplebench.py | 10 +- 3 files changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v7 14/21] scripts/simplebench: support iops

2020-11-13 Thread Max Reitz
tions(+), 10 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v7 13/21] scripts/simplebench: fix grammar: s/successed/succeeded/

2020-11-13 Thread Max Reitz
On 21.10.20 16:58, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/simplebench/simplebench.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH v7 12/21] iotests: add 298 to test new preallocate filter driver

2020-11-13 Thread Max Reitz
mode 100644 tests/qemu-iotests/298 create mode 100644 tests/qemu-iotests/298.out Reviewed-by: Max Reitz

Re: [PATCH v7 11/21] iotests.py: execute_setup_common(): add required_fmts argument

2020-11-13 Thread Max Reitz
(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [PATCH v7 08/21] block: introduce preallocate filter

2020-11-13 Thread Max Reitz
if (prealloc == PREALLOC_MODE_FALLOC) { +/* + * If offset <= s->file_end, the task is already done, just + * update s->file_end, to move part of "filter preallocation" s/file_end/data_end/ With those fixed, and with %s/5\.2/6.0/: Reviewed-by: Ma

Re: [PATCH v7 07/21] block: bdrv_check_perm(): process children anyway

2020-11-13 Thread Max Reitz
| 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz

Re: [PATCH 03/10] block: Improve some block-commit, block-stream error messages

2020-11-13 Thread Max Reitz
hat doesn't resolve with "Base 'BASE' not found". Commit 6b33f3ae8b "qemu-img: Improve commit invalid base message" improved this message in qemu-img. Improve it here, too: "Can't find '%s' in the backing chain". QERR_BASE_NOT_FOUND is

Re: [PATCH v3 2/2] quorum: Implement bdrv_co_pwrite_zeroes()

2020-11-13 Thread Max Reitz
((0x25)) $((0x1))" | _filter_qemu_io + My gut would have preferred a test where the data region is larger than the zeroed region (so we can see that the first write has done something), but who cares about my gut. I don’t mind not setting supported_zero_flags enough to warrant

Re: [PATCH v3 1/2] quorum: Implement bdrv_co_block_status()

2020-11-13 Thread Max Reitz
insertions(+) create mode 100755 tests/qemu-iotests/312 create mode 100644 tests/qemu-iotests/312.out Reviewed-by: Max Reitz

Re: [PATCH for-5.2 10/10] block/export: port virtio-blk read/write range check

2020-11-12 Thread Max Reitz
On 11.11.20 13:43, Stefan Hajnoczi wrote: Check that the sector number and byte count are valid. Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/export/vhost-user-blk-server.c b/block/export/vh

Re: [PATCH for-5.2 09/10] vhost-user-blk-test: test discard/write zeroes invalid inputs

2020-11-12 Thread Max Reitz
On 11.11.20 13:43, Stefan Hajnoczi wrote: Exercise input validation code paths in block/export/vhost-user-blk-server.c. Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 4 +- tests/qtest/vhost-user-blk-test.c| 124 +++ 2 files changed,

Re: [PATCH for-5.2 08/10] block/export: port virtio-blk discard/write zeroes input validation

2020-11-12 Thread Max Reitz
On 11.11.20 13:43, Stefan Hajnoczi wrote: Validate discard/write zeroes the same way we do for virtio-blk. Some of these checks are mandated by the VIRTIO specification, others are internal to QEMU. Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 115

Re: [PATCH for-5.2 04/10] vhost-user-blk-test: rename destroy_drive() to destroy_file()

2020-11-12 Thread Max Reitz
On 11.11.20 13:43, Stefan Hajnoczi wrote: The function is used not just for image files but also for UNIX domain sockets (QMP monitor and vhost-user-blk). Reflect that in the name. Signed-off-by: Stefan Hajnoczi --- tests/qtest/vhost-user-blk-test.c | 9 + 1 file changed, 5 insertion

<    3   4   5   6   7   8   9   10   11   12   >