Re: [PATCH 0/4] iotests: finalize switch to async QMP

2022-02-08 Thread John Snow
Squeak Squeak... ...Any objections to me staging this? (This patchset removes the accommodations in iotests for allowing either library to run and always forces the new one. Point of no return for iotests.) --js On Wed, Feb 2, 2022 at 9:24 PM John Snow wrote: > > Based-on:

Re: [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Thomas Huth
On 08/02/2022 14.12, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have

[PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-08 Thread Emanuele Giuseppe Esposito
Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() is not a good idea: the callback might be called when running a drain in a coroutine, and bdrv_drained_begin_poll() does not handle that case, resulting in assertion failure. Instead, bdrv_do_drained_begin with no recursion

[PATCH 2/6] block.c: bdrv_replace_child_noperm: first remove the child, and then call ->detach()

2022-02-08 Thread Emanuele Giuseppe Esposito
Doing the opposite can make ->detach() (more precisely bdrv_unapply_subtree_drain() in bdrv_child_cb_detach) undo the subtree_drain just performed to protect the removal of the child from the graph, thus making the fully-enabled assert_bdrv_graph_writable fail. Note that

[PATCH 5/6] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-02-08 Thread Emanuele Giuseppe Esposito
This test uses a callback of an I/O function (blk_aio_preadv) to modify the graph, using bdrv_attach_child. This is simply not allowed anymore. I/O cannot change the graph. Before "block/io.c: make bdrv_do_drained_begin_quiesce static and introduce bdrv_drained_begin_no_poll", the test would

Re: [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Paolo Bonzini
On 2/8/22 16:10, Thomas Huth wrote: Before we go down that road, I think it would be better to get rid of the "auto" group and add the list of the iotests that should get run during "make check" to the meson.build file directly. That's easier to understand and less confusing. There are other

Re: [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Thomas Huth
On 08/02/2022 13.36, Paolo Bonzini wrote: On 2/8/22 11:13, Thomas Huth wrote: We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have

[PATCH v2 3/3] jobs: add job-driver.h

2022-02-08 Thread Emanuele Giuseppe Esposito
job-driver.h contains all functions of job.h that are used by the drivers (JobDriver, BlockJobDriver). These functions are unaware of the job_mutex, so they all take and release the lock internally. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito ---

[PATCH v2 2/3] jobs: add job-monitor.h

2022-02-08 Thread Emanuele Giuseppe Esposito
job-monitor.h contains all functions of job.h that are used by the monitor and essentially all functions that do not define a JobDriver/Blockdriver. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job-monitor.h | 249

[PATCH 6/6] jobs: ensure sleep in job_sleep_ns is fully performed

2022-02-08 Thread Emanuele Giuseppe Esposito
If a drain happens while a job is sleeping, the timeout gets cancelled and the job continues once the drain ends. This is especially bad for the sleep performed in commit and stream jobs, since that is dictated by ratelimit to maintain a certain speed. Basically the execution path is the

[PATCH 0/6] block: bug fixes in preparation of AioContext removal

2022-02-08 Thread Emanuele Giuseppe Esposito
This serie aims to remove and clean up some bugs that came up when trying to replace the AioContext lock and still protect BlockDriverState fields. They were part of the serie "Removal of Aiocontext lock through drains: protect bdrv_replace_child_noperm", but since that serie is still a work in

[PATCH v5 17/20] job: detect change of aiocontext within job coroutine

2022-02-08 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini We want to make sure access of job->aio_context is always done under either BQL or job_mutex. The problem is that using aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond makes the coroutine immediately resume, so we can't hold the job lock. And caching it

[PATCH v5 14/20] block_job: rename block_job functions called with job_mutex held

2022-02-08 Thread Emanuele Giuseppe Esposito
Just as for the job API, rename block_job functions that are always called under job lock. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 3 ++- block/backup.c | 4 ++-- blockdev.c | 12 +++- blockjob.c

[PATCH v5 20/20] block_job_query: remove atomic read

2022-02-08 Thread Emanuele Giuseppe Esposito
Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Signed-off-by: Emanuele Giuseppe Esposito --- blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 16/20] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext

2022-02-08 Thread Emanuele Giuseppe Esposito
We are always using the given bs AioContext, so there is no need to take the job ones (which is identical anyways). This also reduces the point we need to check when protecting job.aio_context field. Signed-off-by: Emanuele Giuseppe Esposito --- block/commit.c | 4 ++-- block/mirror.c | 2 +- 2

[PATCH 3/6] block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child

2022-02-08 Thread Emanuele Giuseppe Esposito
Doing the opposite can make adding the child node to a non-drained node, as apply_subtree_drain is only done in ->attach() and thus make assert_bdrv_graph_writable fail. This can happen for example during a transaction rollback (test 245, test_io_with_graph_changes): 1. a node is removed from the

[PATCH 4/6] test-bdrv-drain.c: adapt test to the coming subtree drains

2022-02-08 Thread Emanuele Giuseppe Esposito
There will be 2 problems in this test when we will add subtree drains in bdrv_replace_child_noperm: - First, the test is inconsistent about taking the AioContext lock when calling bdrv_replace_child_noperm. bdrv_replace_child_noperm is reached in two places: from blk_insert_bs directly, and

[PATCH v5 15/20] job.h: define unlocked functions

2022-02-08 Thread Emanuele Giuseppe Esposito
All these functions assume that the lock is not held, and acquire it internally. These functions will be useful when job_lock is globally applied, as they will allow callers to access the job struct fields without worrying about the job lock. Update also the comments in blockjob.c (and move them

[PATCH v5 18/20] jobs: protect job.aio_context with BQL and job_mutex

2022-02-08 Thread Emanuele Giuseppe Esposito
In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so the job is paused). For this reason, introduce

[PATCH v5 12/20] jobs: rename static functions called with job_mutex held

2022-02-08 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the static functions that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_refjob_txn_del_job job_txn_apply job_state_transition job_should_pause

[PATCH v5 11/20] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU

2022-02-08 Thread Emanuele Giuseppe Esposito
Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, using the helpers prepared in previous commit. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito ---

[PATCH v5 10/20] jobs: use job locks also in the unit tests

2022-02-08 Thread Emanuele Giuseppe Esposito
Add missing job synchronization in the unit tests, with explicit locks. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito --- tests/unit/test-bdrv-drain.c | 76 - tests/unit/test-block-iothread.c |

[PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

2022-02-08 Thread Emanuele Giuseppe Esposito
Same as AIO_WAIT_WHILE macro, but if we are in the Main loop do not release and then acquire ctx_ 's aiocontext. Once all Aiocontext locks go away, this macro will replace AIO_WAIT_WHILE. Signed-off-by: Emanuele Giuseppe Esposito --- include/block/aio-wait.h | 15 +++ 1 file

[PATCH v5 09/20] jobs: add job lock in find_* functions

2022-02-08 Thread Emanuele Giuseppe Esposito
Both blockdev.c and job-qmp.c have TOC/TOU conditions, because they first search for the job and then perform an action on it. Therefore, we need to do the search + action under the same job mutex critical section. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*.

[PATCH v5 02/20] job.h: categorize fields in struct Job

2022-02-08 Thread Emanuele Giuseppe Esposito
Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job.h | 59 ++ 1 file changed, 34 insertions(+), 25 deletions(-) diff --git

[PATCH v5 01/20] job.c: make job_mutex and job_lock/unlock() public

2022-02-08 Thread Emanuele Giuseppe Esposito
job mutex will be used to protect the job struct elements and list, replacing AioContext locks. Right now use a shared lock for all jobs, in order to keep things simple. Once the AioContext lock is gone, we can introduce per-job locks. To simplify the switch from aiocontext to job lock,

[PATCH v5 04/20] job.c: move inner aiocontext lock in callbacks

2022-02-08 Thread Emanuele Giuseppe Esposito
Instead of having the lock in job_tnx_apply, move it inside in the callback. This will be helpful for next commits, when we introduce job_lock/unlock pairs. job_transition_to_pending() and job_needs_finalize() do not need to be protected by the aiocontext lock. No functional change intended.

[PATCH v5 03/20] job.c: API functions not used outside should be static

2022-02-08 Thread Emanuele Giuseppe Esposito
job_event_* functions can all be static, as they are not used outside job.c. Same applies for job_txn_add_job(). Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job.h | 18 -- job.c | 12 +--- 2 files changed, 9 insertions(+), 21 deletions(-)

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Thomas Huth
On 08/02/2022 14.11, Philippe Mathieu-Daudé wrote: On 8/2/22 13:38, Thomas Huth wrote: On 08/02/2022 13.28, Hanna Reitz wrote: On 08.02.22 13:13, Thomas Huth wrote: On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not

Re: [PULL 0/4] Python patches

2022-02-08 Thread Peter Maydell
On Thu, 3 Feb 2022 at 23:22, John Snow wrote: > > On Thu, Feb 3, 2022 at 11:52 AM Peter Maydell > wrote: > > > > On Thu, 3 Feb 2022 at 16:38, John Snow wrote: > > > > > On Thu, Feb 3, 2022, 11:20 AM Peter Maydell > > > wrote: > > >> Summary of Failures: > > >> > > >> 1/1 qemu:block /

[PATCH v2 1/3] jobs: add job-common.h

2022-02-08 Thread Emanuele Giuseppe Esposito
job-common.h contains all struct and common function that currently are in job.h and will be shared by job-monitor and job-driver in the next commits. Also move job_type(), job_type_str() and job_is_internal there, as they are common helper functions. No functional change intended.

[PATCH v5 06/20] jobs: remove aiocontext locks since the functions are under BQL

2022-02-08 Thread Emanuele Giuseppe Esposito
In preparation to the job_lock/unlock patch, remove these aiocontext locks. The main reason these two locks are removed here is because they are inside a loop iterating on the jobs list. Once the job_lock is added, it will have to protect the whole loop, wrapping also the aiocontext

[PATCH v2 0/3] job: split job API in driver and monitor

2022-02-08 Thread Emanuele Giuseppe Esposito
In this series, we split the job API in two headers: job-driver.h and job-monitor.h. As explained in job.c, job-monitor are the functions mainly used by the monitor, and require consistency between the search of a specific job (job_get) and the actual operation/action on it (e.g. job_user_cancel).

[PATCH v5 13/20] job.h: rename job API functions called with job_mutex held

2022-02-08 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the job functions of the job API that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_unref job_txn_add_job job_ref job_unref job_enter_cond job_finish_sync

[PATCH v5 19/20] job.c: enable job lock/unlock and remove Aiocontext locks

2022-02-08 Thread Emanuele Giuseppe Esposito
Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other functions too, reduce the locking section as much as

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Philippe Mathieu-Daudé via
On 8/2/22 13:38, Thomas Huth wrote: On 08/02/2022 13.28, Hanna Reitz wrote: On 08.02.22 13:13, Thomas Huth wrote: On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the

Re: [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Paolo Bonzini
On 2/8/22 11:13, Thomas Huth wrote: We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have originally been done in the tests/check-block.sh

[PATCH v5 08/20] jobs: protect jobs with job_lock/unlock

2022-02-08 Thread Emanuele Giuseppe Esposito
Introduce the job locking mechanism through the whole job API, following the comments in job.h and requirements of job-monitor (like the functions in job-qmp.c, assume lock is held) and job-driver (like in mirror.c and all other JobDriver, lock is not held). Use the _locked helpers introduced

[PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-02-08 Thread Emanuele Giuseppe Esposito
In preparation to the job_lock/unlock usage, create _locked duplicates of some functions, since they will be sometimes called with job_mutex held (mostly within job.c), and sometimes without (mostly from JobDrivers using the job API). Therefore create a _locked version of such function, so that

Re: [PATCH v6 00/33] block layer: split block APIs in global state and I/O

2022-02-08 Thread Kevin Wolf
Am 08.02.2022 um 12:42 hat Emanuele Giuseppe Esposito geschrieben: > > > On 07/02/2022 19:30, Kevin Wolf wrote: > > Am 21.01.2022 um 18:05 hat Emanuele Giuseppe Esposito geschrieben: > >> Each function in the GS API will have an assertion, checking > >> that it is always running under BQL. > >>

[PATCH v5 00/20] job: replace AioContext lock with job_mutex

2022-02-08 Thread Emanuele Giuseppe Esposito
In this series, we want to remove the AioContext lock and instead use the already existent job_mutex to protect the job structures and list. This is part of the work to get rid of AioContext lock usage in favour of smaller granularity locks. In order to simplify reviewer's job, job lock/unlock

Re: [PATCH 2/6] tests/qemu-iotests/meson.build: Improve the indentation

2022-02-08 Thread Hanna Reitz
On 08.02.22 11:13, Thomas Huth wrote: By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 61

Re: [PATCH v6 00/33] block layer: split block APIs in global state and I/O

2022-02-08 Thread Emanuele Giuseppe Esposito
On 07/02/2022 19:30, Kevin Wolf wrote: > Am 21.01.2022 um 18:05 hat Emanuele Giuseppe Esposito geschrieben: >> Each function in the GS API will have an assertion, checking >> that it is always running under BQL. >> I/O functions are instead thread safe (or so should be), meaning >> that they

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Hanna Reitz
On 08.02.22 13:13, Thomas Huth wrote: On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests, so

Re: [PATCH 3/6] tests/qemu-iotests: Allow to run "./check -n" from the source directory, too

2022-02-08 Thread Hanna Reitz
On 08.02.22 11:13, Thomas Huth wrote: For better integration of the iotests into the meson build system, it would be very helpful to get the list of the tests in the "auto" group during the "configure" step already. However, "check -n -g auto" currently only works if the binaries have already

Re: [PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Hanna Reitz
On 08.02.22 11:13, Thomas Huth wrote: We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have originally been done in the

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Hanna Reitz
On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests, so that the python-based tests could still be run. Thus add the check for BusyBox

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Thomas Huth
On 08/02/2022 13.28, Hanna Reitz wrote: On 08.02.22 13:13, Thomas Huth wrote: On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better

Re: [PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore

2022-02-08 Thread Paolo Bonzini
On 2/8/22 12:16, Thomas Huth wrote: This code being deleted claims to be doing something to ensure that the tests get run and output the useful messages on failure. No, AFAIK that --verbose switch just influences how meson prints the progress during the test runs (i.e. either a brief or a

Re: [PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Thomas Huth
On 08/02/2022 12.46, Hanna Reitz wrote: On 08.02.22 11:13, Thomas Huth wrote: Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests, so that the python-based tests could still

Re: [PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore

2022-02-08 Thread Thomas Huth
On 08/02/2022 11.26, Peter Maydell wrote: On Tue, 8 Feb 2022 at 10:18, Thomas Huth wrote: Now that we add the single iotests directly in meson.build, we do not have to separate the block suite from the other suites anymore. Signed-off-by: Thomas Huth --- meson.build| 6 +++---

Re: [PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 11:16, Thomas Huth wrote: > > On 08/02/2022 11.26, Peter Maydell wrote: > > What is the mechanism for this in the new meson setup ? > > cat meson-logs/testlog.txt > > ... I guess we should either dump that to stdout Yes, it needs to actually appear in the stdout for CI

Re: [PATCH v6 31/33] include/qemu/job.h: introduce job->pre_run() and use it in amend

2022-02-08 Thread Emanuele Giuseppe Esposito
On 07/02/2022 19:14, Kevin Wolf wrote: > Am 21.01.2022 um 18:05 hat Emanuele Giuseppe Esposito geschrieben: >> Introduce .pre_run() job callback. This cb will run in job_start, >> before the coroutine is created and runs run() in the job aiocontext. >> >> Therefore, .pre_run() always runs in

Re: [PATCH 2/6] tests/qemu-iotests/meson.build: Improve the indentation

2022-02-08 Thread Philippe Mathieu-Daudé via
On 8/2/22 11:13, Thomas Huth wrote: By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 61

Re: [PATCH v6 02/33] include/block/block: split header into I/O and global state API

2022-02-08 Thread Emanuele Giuseppe Esposito
On 07/02/2022 17:53, Kevin Wolf wrote: > Am 01.02.2022 um 11:30 hat Paolo Bonzini geschrieben: >> On 2/1/22 10:45, Emanuele Giuseppe Esposito wrote: That said, even if they are a different category, I think it makes sense to leave them in the same header file as I/O functions, because

Re: [PATCH v6 13/33] include/block/blockjob.h: global state API

2022-02-08 Thread Emanuele Giuseppe Esposito
On 07/02/2022 18:26, Kevin Wolf wrote: > Am 21.01.2022 um 18:05 hat Emanuele Giuseppe Esposito geschrieben: >> blockjob functions run always under the BQL lock. >> >> Signed-off-by: Emanuele Giuseppe Esposito >> Reviewed-by: Stefan Hajnoczi >> --- >> include/block/blockjob.h | 9 + >>

Re: [PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 10:18, Thomas Huth wrote: > > Now that we add the single iotests directly in meson.build, we do > not have to separate the block suite from the other suites anymore. > > Signed-off-by: Thomas Huth > --- > meson.build| 6 +++--- > scripts/mtest2make.py | 4

[PATCH 6/6] tests: Remove check-block.sh

2022-02-08 Thread Thomas Huth
Now that the iotests are added by the meson.build file already, we do not need the check-block.sh wrapper script anymore. Signed-off-by: Thomas Huth --- tests/check-block.sh | 73 1 file changed, 73 deletions(-) delete mode 100755

[PATCH 5/6] tests: Do not treat the iotests as separate meson test target anymore

2022-02-08 Thread Thomas Huth
Now that we add the single iotests directly in meson.build, we do not have to separate the block suite from the other suites anymore. Signed-off-by: Thomas Huth --- meson.build| 6 +++--- scripts/mtest2make.py | 4 tests/Makefile.include | 9 + 3 files changed, 4

[PATCH 4/6] tests/qemu-iotests/meson.build: Call the 'check' script directly

2022-02-08 Thread Thomas Huth
We can get a nicer progress indication if we add the iotests individually via the 'check' script instead of going through the check-block.sh wrapper. For this, we have to add some of the sanity checks that have originally been done in the tests/check-block.sh script (whether "bash" is available

[PATCH 3/6] tests/qemu-iotests: Allow to run "./check -n" from the source directory, too

2022-02-08 Thread Thomas Huth
For better integration of the iotests into the meson build system, it would be very helpful to get the list of the tests in the "auto" group during the "configure" step already. However, "check -n -g auto" currently only works if the binaries have already been built. Re-order the code in the

[PATCH 1/6] tests/qemu-iotests: Improve the check for GNU sed

2022-02-08 Thread Thomas Huth
Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests, so that the python-based tests could still be run. Thus add the check for BusyBox sed to common.rc and mark the tests as

[PATCH 2/6] tests/qemu-iotests/meson.build: Improve the indentation

2022-02-08 Thread Thomas Huth
By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build | 61 ++ 1 file changed, 32

[PATCH 0/6] Improve integration of iotests in the meson test harness

2022-02-08 Thread Thomas Huth
Though "make check-block" is currently already run via the meson test runner, it still looks like an oddball in the output of "make check" since the tests are still run separately via the check-block.sh script. It would be nicer if the iotests would show up like the other tests suites. For this we

Re: [PATCH 5/5] libvduse: Add support for reconnecting

2022-02-08 Thread Yongji Xie
On Tue, Feb 8, 2022 at 4:09 PM Stefan Hajnoczi wrote: > > On Tue, Feb 08, 2022 at 03:35:27PM +0800, Yongji Xie wrote: > > On Mon, Feb 7, 2022 at 10:39 PM Stefan Hajnoczi wrote: > > > > > > On Tue, Jan 25, 2022 at 09:18:00PM +0800, Xie Yongji wrote: > > > > +static void *vduse_log_get(const char

Re: [PATCH 5/5] libvduse: Add support for reconnecting

2022-02-08 Thread Stefan Hajnoczi
On Tue, Feb 08, 2022 at 03:35:27PM +0800, Yongji Xie wrote: > On Mon, Feb 7, 2022 at 10:39 PM Stefan Hajnoczi wrote: > > > > On Tue, Jan 25, 2022 at 09:18:00PM +0800, Xie Yongji wrote: > > > +static void *vduse_log_get(const char *dir, const char *name, size_t > > > size) > > > +{ > > > +

Re: [PATCH 2/5] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-02-08 Thread Stefan Hajnoczi
On Tue, Feb 08, 2022 at 02:42:41PM +0800, Yongji Xie wrote: > On Mon, Feb 7, 2022 at 10:01 PM Stefan Hajnoczi wrote: > > > > On Tue, Jan 25, 2022 at 09:17:57PM +0800, Xie Yongji wrote: > > > +int vduse_dev_handler(VduseDev *dev) > > > +{ > > > +struct vduse_dev_request req; > > > +struct

Re: [PATCH 5/5] libvduse: Add support for reconnecting

2022-02-08 Thread Yongji Xie
On Mon, Feb 7, 2022 at 10:39 PM Stefan Hajnoczi wrote: > > On Tue, Jan 25, 2022 at 09:18:00PM +0800, Xie Yongji wrote: > > To support reconnecting after restart or crash, VDUSE backend > > might need to resubmit inflight I/Os. This stores the metadata > > such as the index of inflight I/O's