[PULL 43/50] blockjob: rename notifier callbacks as _locked

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito They all are called with job_lock held, in job_event_*_locked() Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Message-Id: <20220926093214.506243-16-eespo...@redhat.

[PULL 17/50] curl: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-17-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 1e0f609579..cba4c4cac7 100644 --- a/block/curl.c +++ b/block/curl.c @@ -855,7 +855,7 @@ out_noclean:

[PULL 24/50] raw-format: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-24-pbonz...@redhat.com> [kwolf: Fixed up coding style] Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/raw-format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/raw-format.c b/block/raw-format.c index c7278e348e..f337ac7569 100644 --- a/block/raw-format.c

[PULL 27/50] test-coroutine: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
Message-Id: <20220922084924.201610-27-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/unit/test-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-coroutine.c b/tests/unit/test-coroutine.c index aa77a3bcb3..e16b80c

[PULL 21/50] vmdk: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-21-pbonz...@redhat.com> [kwolf: Fixed up coding style] Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index fe07a54866..f7d8856dfb 100644 --- a/block/vmdk.c ++

[PULL 28/50] quorum: Remove unnecessary forward declaration

2022-10-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Message-Id: <20221006122607.162769-1-kw...@redhat.com> Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kevin Wolf --- block/quorum.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 970f

[PULL 18/50] qed: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-18-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qed.c b/block/qed.c index 324ca0e95a..bda00e6257 100644 --- a/block/qed.c +++ b/block/qed.c @@ -254,7 +254,7 @@ stat

[PULL 26/50] migration: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
eviewed-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20220922084924.201610-26-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- migration/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migra

[PULL 50/50] file-posix: Remove unused s->discard_zeroes

2022-10-07 Thread Kevin Wolf
The field is unused (only ever set, but never read) since commit ac9185603. Additionally, the commit message of commit 34fa110e already explained earlier why it's unreliable. Remove it. Signed-off-by: Kevin Wolf Message-Id: <20220923142838.91043-1-kw...@redhat.com> Signed-off-by:

[PULL 12/50] nfs: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-12-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index 444c40b458..596ebe98cb 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -223,7 +223,7 @@ static void nfs_process

[PULL 40/50] job: detect change of aiocontext within job coroutine

2022-10-07 Thread Kevin Wolf
ob_set_aio_context allows changing the aiocontext only while the job is paused, this is the exact place where the coroutine resumes, before running JobDriver's code. Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <2022092

[PULL 20/50] throttle: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-20-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/throttle.c b/block/throttle.c index 6e8d52fa24..ddd450593a 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -162,7 +162

[PULL 44/50] blockjob: protect iostatus field in BlockJob struct

2022-10-07 Thread Kevin Wolf
block_job_iostatus_set_err_locked(), always called under job lock. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20220926093214.506243-17-eespo...@redhat.com> [kwolf: Fixed up type of iostatus] Signed-off-by: Kevin Wolf ---

[PULL 29/50] job.c: make job_mutex and job_lock/unlock() public

2022-10-07 Thread Kevin Wolf
dimir Sementsov-Ogievskiy Message-Id: <20220926093214.506243-2-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/qemu/job.h | 24 job.c | 35 +++ 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/i

[PULL 47/50] block_job_query: remove atomic read

2022-10-07 Thread Kevin Wolf
Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Message-Id: <20220926093214.506243-20-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockjob.c b/blockjob.c index d04f804001..120c1b7ead 100644 --- a/bloc

[PULL 45/50] job.h: categorize JobDriver callbacks that need the AioContext lock

2022-10-07 Thread Kevin Wolf
spo...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/job.h | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index c96387069d..b943d90e8f 100644 --- a/include/qemu/job.h +++ b/i

[PULL 16/50] copy-before-write: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-16-pbonz...@redhat.com> [kwolf: Fixed up coding style] Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/copy-before-write.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index c24b8dd117..afbdd04489 10

[PULL 35/50] blockjob: introduce block_job _locked() APIs

2022-10-07 Thread Kevin Wolf
macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Message-Id: <20220926093214.506243-8-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/blockjob.

[PULL 22/50] job: add missing coroutine_fn annotations

2022-10-07 Thread Kevin Wolf
1610-22-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/job.h | 2 +- job.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index c105b31076..397ac39608 100644 --- a/include/qemu/job.h ++

[PULL 34/50] job: move and update comments from blockjob.c

2022-10-07 Thread Kevin Wolf
Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Message-Id: <20220926093214.506243-7-eespo...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockjob.c | 20 job.c | 16 2 files changed, 16 inse

[PULL 33/50] job.c: add job_lock/unlock while keeping job.h intact

2022-10-07 Thread Kevin Wolf
his stage, job_{lock/unlock} and job lock guard macros are *nop* Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20220926093214.506243-6-eespo...@redhat.com> Signed-off-by: Kevin Wolf --

[PULL 37/50] jobs: use job locks also in the unit tests

2022-10-07 Thread Kevin Wolf
Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Message-Id: <20220926093214.506243-10-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- tests/unit/test-bdrv-drain.c | 76 tests/unit/test-block-iothread.c | 8 ++- tests/uni

[PULL 38/50] block/mirror.c: use of job helpers in drivers

2022-10-07 Thread Kevin Wolf
Sementsov-Ogievskiy Message-Id: <20220926093214.506243-11-eespo...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/mirror.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 3c4ab1159d..c6bf7f40ce

[PULL 39/50] jobs: group together API calls under the same job lock

2022-10-07 Thread Kevin Wolf
guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20220926093214.506243-12-eespo...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c| 17 ++--- blockdev.c

[PULL 42/50] blockjob.h: categorize fields in struct BlockJob

2022-10-07 Thread Kevin Wolf
com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/blockjob.h | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 8b65d3949d..10c24e240a 100644 --- a/include/block/bloc

[PULL 46/50] job.c: enable job lock/unlock and remove Aiocontext locks

2022-10-07 Thread Kevin Wolf
twice. Also remove real_job_{lock/unlock}, as they are replaced by the public functions. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20220926093214.506243-19-eespo...@redhat.com> Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- i

[PULL 48/50] blockjob: remove unused functions

2022-10-07 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito These public functions are not used anywhere, thus can be dropped. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20220926093214.506243-21-ee

[PULL 41/50] jobs: protect job.aio_context with BQL and job_mutex

2022-10-07 Thread Kevin Wolf
e: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Suggested-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20220926093214.506243-14-eespo...@redhat.com> Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wo

[PULL 49/50] job: remove unused functions

2022-10-07 Thread Kevin Wolf
r not. Also document the locking requirements for a few functions where the second version is not removed. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Message-Id: <20220926093214.506243-22-eespo...@redhat.com> Reviewed-by: Vladimi

Re: [PATCH v2 01/11] block.c: assert bs->aio_context is written under BQL and drains

2022-10-07 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > Also here ->aio_context is read by I/O threads and written > under BQL. > > Reviewed-by: Hanna Reitz > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 02/11] block: use transactions as a replacement of ->{can_}set_aio_context()

2022-10-07 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > Simplify the way the aiocontext can be changed in a BDS graph. > There are currently two problems in bdrv_try_set_aio_context: > - There is a confusion of AioContext locks taken and released, because > we assume that old aiocont

Re: [PATCH v2 03/11] bdrv_change_aio_context: use hash table instead of list of visited nodes

2022-10-07 Thread Kevin Wolf
not actually a proper hash map, but an hash set, > as we are just adding nodes and not key,value pairs. > > Suggested-by: Hanna Reitz > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 04/11] bdrv_child_try_change_aio_context: add transaction parameter

2022-10-07 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > This enables the caller to use the same transaction to also > keep track of aiocontext changes. > > Signed-off-by: Emanuele Giuseppe Esposito What you're really doing here is factoring out the recursive phase. However, the fact

Re: [PATCH v2 05/11] blockjob: implement .change_aio_ctx in child_job

2022-10-10 Thread Kevin Wolf
his point. > > Reviewed-by: Hanna Reitz > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 06/11] block: implement .change_aio_ctx in child_of_bds

2022-10-10 Thread Kevin Wolf
yone at this point. > > Reviewed-by: Hanna Reitz > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 07/11] block-backend: implement .change_aio_ctx in child_root

2022-10-10 Thread Kevin Wolf
d > AioContext. blk_root_set_aio_ctx_commit() is the same as > blk_root_set_aio_ctx(). > > Note: bdrv_child_try_change_aio_context() is not called by > anyone at this point. > > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 10/11] block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context

2022-10-10 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > No functional changes intended. > > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 08/11] block: use the new _change_ API instead of _can_set_ and _set_

2022-10-10 Thread Kevin Wolf
t; > From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx > won't be used anymore. > > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 09/11] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-10-10 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > Together with all _can_set_ and _set_ APIs, as they are not needed > anymore. > > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v2 11/11] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context

2022-10-10 Thread Kevin Wolf
Am 25.07.2022 um 14:21 hat Emanuele Giuseppe Esposito geschrieben: > No functional change intended. > > Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf

Re: [PATCH v3 12/26] block/vvfat: Unify the mkdir() call

2022-10-21 Thread Kevin Wolf
gt; the codes without #ifdefs. > > Signed-off-by: Bin Meng > Reviewed-by: Marc-André Lureau > Signed-off-by: Alex Bennée > Message-Id: <20221006151927.2079583-6-bmeng...@gmail.com> Reviewed-by: Kevin Wolf

Re: [PATCH v6 2/2] block: Refactor get_tmp_filename()

2022-10-21 Thread Kevin Wolf
Am 10.10.2022 um 06:04 hat Bin Meng geschrieben: > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1); > ... > re

Re: [PATCH v2 0/2] Fix some problems with vvfat in R/W mode

2022-10-21 Thread Kevin Wolf
Am 10.10.2022 um 19:55 hat Hervé Poussineau geschrieben: > Hi, > > When testing vvfat in read-write mode, I came across some blocking > problems when using Windows guests. > This patchset is not here to fix all problems of vvfat, but only the > main ones I encountered. > > First patch allows sett

Re: [PATCH] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-10-21 Thread Kevin Wolf
Am 24.09.2022 um 16:48 hat Sam Li geschrieben: > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193 > > The commit "Use io_uring_register_ring_fd() to skip fd operations" broke > when booting a guest with iothread and io_uring. That is because the > io_uring_register_ring_fd() call is ma

Re: [PATCH v6 1/2] block: Ignore close() failure in get_tmp_filename()

2022-10-21 Thread Kevin Wolf
Am 10.10.2022 um 06:04 hat Bin Meng geschrieben: > The temporary file has been created and is ready for use. Checking > return value of close() does not seem useful. The file descriptor > is almost certainly closed; see close(2) under "Dealing with error > returns from close()". > > Let's simply i

Re: [PATCH] vhost-user-blk: fix the resize crash

2022-10-21 Thread Kevin Wolf
Am 19.09.2022 um 14:18 hat Li Feng geschrieben: > If the os is not installed and doesn't have the virtio guest driver, > the vhost dev isn't started, so the dev->vdev is NULL. > > Reproduce: mount a Win 2019 iso, go into the install ui, then resize > the virtio-blk device, qemu crash. > > Signed-

Re: [PATCH v7 for-7.2 00/15] block: cleanup backing and file handling

2022-10-24 Thread Kevin Wolf
Am 26.07.2022 um 22:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > That's the first part of > "[PATCH v5 00/45] Transactional block-graph modifying API", > updated and is fully reviewed by Hanna. > > v7: add r-bs and rebase on master Thanks, applied to the block branch. Kevin

Re: [PATCH v3 00/10] Refactor bdrv_try_set_aio_context using transactions

2022-10-25 Thread Kevin Wolf
Am 25.10.2022 um 10:49 hat Emanuele Giuseppe Esposito geschrieben: > The aim of this series is to reorganize bdrv_try_set_aio_context > and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in > favour of a new one, ->change_aio_ctx. > > More informations in patch 3 (which is also RFC, du

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > Hi Kevin, > [...] > Will you queue this patch via the block tree? Just to be sure, you mean only patch 5? Yes, I can do that. Kevin

Re: [PATCH 23/24] vmdk: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:37 hat Paolo Bonzini geschrieben: > From: Alberto Faria > > Signed-off-by: Alberto Faria > Signed-off-by: Paolo Bonzini > @@ -1624,12 +1624,11 @@ static int coroutine_fn > get_cluster_offset(BlockDriverState *bs, > } > l2_table = (char *)extent->l2_cache + (min_i

Re: [PATCH 19/24] qcow2: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:37 hat Paolo Bonzini geschrieben: > From: Alberto Faria > > Signed-off-by: Alberto Faria > Signed-off-by: Paolo Bonzini > @@ -1699,8 +1699,8 @@ static int coroutine_fn qcow2_do_open(BlockDriverState > *bs, QDict *options, > } > > s->image_backing_file =

Re: [PATCH 00/24] More coroutine_fn fixes

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:36 hat Paolo Bonzini geschrieben: > Most of these were extracted from Alberto's static analysis series. > After this series, the only errors reported by the analyzer are: > > - a call to bs->drv->bdrv_co_drain_begin from bdrv_open_driver. This > relies on bdrv_co_drain_begin

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 09:27 hat Emanuele Giuseppe Esposito geschrieben: > blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE > but can be invoked from iothreads when handling scsi requests. > This triggers an assertion failure: > > 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/li

[PULL 10/58] block/blklogwrites: don't care to remove bs->file child on failure

2022-10-27 Thread Kevin Wolf
yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blklogwrites.c | 4 1 file changed, 4 deletions(-) diff --git a/block/blklogwrites.c b/block/blklogwrites.c index 12b4c3c8cf..cef9efe55d 100644 --- a/block/blklogwrites.c +++ b/block/blklogwrites.c @@ -254,10 +

[PULL 02/58] block: Ignore close() failure in get_tmp_filename()

2022-10-27 Thread Kevin Wolf
. Suggested-by: Markus Armbruster Signed-off-by: Bin Meng Reviewed-by: Markus Armbruster Message-Id: <20221010040432.3380478-1-bin.m...@windriver.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bl

[PULL 03/58] block: Refactor get_tmp_filename()

2022-10-27 Thread Kevin Wolf
some comments to mention that /var/tmp is preferred over /tmp on non-win32 hosts. Signed-off-by: Bin Meng Message-Id: <20221010040432.3380478-2-bin.m...@windriver.com> [kwolf: Fixed incorrect errno negation and iotest 051] Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/bl

[PULL 17/58] Revert "block: Let replace_child_tran keep indirect pointer"

2022-10-27 Thread Kevin Wolf
-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-11-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- block.c | 81 +++-- 1 file changed, 10 insertions(+), 71 deletions(-) diff --git a/block.c b/block.c in

[PULL 00/58] Block layer patches

2022-10-27 Thread Kevin Wolf
The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2022-10-26 10:53:49 -0400) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 18/58] Revert "block: Restructure remove_file_or_backing_child()"

2022-10-27 Thread Kevin Wolf
-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-12-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- block.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 196d1cf665..2f80b7e094 100644 -

[PULL 28/58] block-backend: implement .change_aio_ctx in child_root

2022-10-27 Thread Kevin Wolf
me as blk_root_set_aio_ctx(). Note: bdrv_child_try_change_aio_context() is not called by anyone at this point. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-7-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- block/block-bac

[PULL 22/58] block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

2022-10-27 Thread Kevin Wolf
: <20220726201134.924743-16-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- block.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/block.c b/block.c index ed11a421b0..2d74bfe665 100644 --- a/block.c +++ b/block.c @@ -92,9 +92,7 @@ stati

[PULL 27/58] block: implement .change_aio_ctx in child_of_bds

2022-10-27 Thread Kevin Wolf
Reviewed-by: Hanna Reitz Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-6-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- block.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block.c b/block.c index 59319d9b0f..3386457083 100644 --- a/block.c +++ b/block.c @@ -

[PULL 20/58] block: Manipulate bs->file / bs->backing pointers in .attach/.detach

2022-10-27 Thread Kevin Wolf
t to restring setting them by hand outside of .attach/.detach. So, this patch cleanups all remaining places where they were set. To find such places I use: git grep '\->file =' git grep '\->backing =' git grep '&.*\' git grep '&.*\&#

[PULL 05/58] vvfat: allow spaces in file names

2022-10-27 Thread Kevin Wolf
From: Hervé Poussineau In R/W mode, files with spaces were never created on host side. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176 Fixes: c79e243ed67683d6d06692bd7040f7394da178b0 Signed-off-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf

[PULL 13/58] test-bdrv-graph-mod: fix filters to be filters

2022-10-27 Thread Kevin Wolf
dimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-7-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block_int-common.h | 5 +++-- tests/unit/test-bdrv-graph-mod.c | 24 +--- 2 files

[PULL 12/58] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

2022-10-27 Thread Kevin Wolf
automatically set/unset this field in generic code. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-6-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/unit/test-bdrv-drain.c | 1 + 1 file chang

[PULL 30/58] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-9-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-

[PULL 44/58] qcow: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 72ed4c3321..46bbabd2e3 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -92,7 +92,8 @@ typedef struct BD

[PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-10-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PULL 32/58] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-11-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- docs/devel/multiple-iothreads.txt | 4 ++-- include/block

[PULL 19/58] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-10-27 Thread Kevin Wolf
-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-13-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- block.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 2f80b7e094..683a9e0eff 100644 -

[PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-8-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

[PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-11-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c

[PULL 08/58] block: BlockDriver: add .filtered_child_is_backing field

2022-10-27 Thread Kevin Wolf
will be used in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-2-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block_int-common.h | 13 + blo

[PULL 51/58] qcow: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-19-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow.c | 45 +++-- 1 file changed, 23 inse

[PULL 15/58] block/snapshot: stress that we fallback to primary child

2022-10-27 Thread Kevin Wolf
dimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-9-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/snapshot.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/block/s

[PULL 01/58] MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

2022-10-27 Thread Kevin Wolf
layer core", except for the QAPI schema files. I haven't acted as maintainer in this area for a long time. Make it official: add the QAPI schema files to section "Block layer core", and delete section "Block QAPI, monitor, command line". Cc: Kevin Wolf Cc: Hanna R

[PULL 45/58] qcow2: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-13-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h

[PULL 37/58] ssh: add missing coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria ssh_write is only called from ssh_co_writev. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-5-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/ssh.c | 6 +++--- 1 file changed, 3 inse

[PULL 06/58] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-10-27 Thread Kevin Wolf
7f78a1125a and 77e3f038af1764983087e3551a0fde9951952c4d. Cc: qemu-sta...@nongnu.org Signed-off-by: Sam Li Message-Id: <20220924144815.5591-1-faithilike...@gmail.com> Reviewed-by: Stefano Garzarella Tested-by: Dario Faggioli Signed-off-by: Kevin Wolf --- block/io_uring.c | 13 +-

[PULL 07/58] vhost-user-blk: fix the resize crash

2022-10-27 Thread Kevin Wolf
g Message-Id: <20220919121816.3252223-1-fen...@smartx.com> Reviewed-by: Raphael Norwitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- hw/block/vhost-user-blk.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 84902dde17..13bf5cc

[PULL 47/58] commit: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-15-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/comm

[PULL 34/58] backup: remove incorrect coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The .set_speed callback is not called from coroutine. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-2-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/backup.c | 2 +- 1 file chan

[PULL 49/58] mirror: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-17-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PULL 36/58] monitor: add missing coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria hmp_block_resize and hmp_screendump are defined as a ".coroutine = true" command, so they must be coroutine_fn. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-4-pbonz...@redhat.com> Reviewed-by: Kevin Wol

[PULL 11/58] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-10-27 Thread Kevin Wolf
d to the test code. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-5-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- tests/unit/test-bdrv-graph-mod.c | 80 +++- 1 file changed, 49 insertions(+), 31 d

[PULL 25/58] bdrv_change_aio_context: use hash table instead of list of visited nodes

2022-10-27 Thread Kevin Wolf
just adding nodes and not key,value pairs. Suggested-by: Hanna Reitz Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-4-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-global-state.h | 2 +- include/block/blo

[PULL 55/58] vhdx: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-23-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vhdx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PULL 24/58] block: use transactions as a replacement of ->{can_}set_aio_context()

2022-10-27 Thread Kevin Wolf
ain and aiocontext change). Note that the "change" API is not yet invoked anywhere. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20221025084952.2139888-3-eespo...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-global-state.h

[PULL 58/58] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
GLOBAL_STATE_CODE in IO_CODE is allowed, since GSC callers are allowed to call IO_CODE. Resolves: #1272 Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20221027072726.2681500-1-eespo...@redhat.com> Reviewed-by: Kevin Wolf Reviewed-by: Hanna Reitz Tested-by: Antoine Damhet Signed-off-

[PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_

2022-10-27 Thread Kevin Wolf
>set_aio_ctx won't be used anymore. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-8-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- block.c | 44 --- block/block-backen

[PULL 31/58] block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito No functional changes intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-10-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-global-state.h | 4 ++-- b

[PULL 38/58] block: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-6-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-io.h | 5 +++--

[PULL 57/58] monitor: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-25-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockd

[PULL 21/58] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

2022-10-27 Thread Kevin Wolf
: <20220726201134.924743-15-vsement...@yandex-team.ru> Signed-off-by: Kevin Wolf --- block/snapshot.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/block/snapshot.c b/block/snapshot.c index f3971ac2bd..e22ac3eac6 100644 --- a

[PULL 26/58] blockjob: implement .change_aio_ctx in child_job

2022-10-27 Thread Kevin Wolf
eviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-5-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- blockjob.c | 45 + 1 file changed, 45 insertions(+) diff --git a/blockjob.c b/blockjob.c index bdf20a0e35..5a783b75c6 100644 --- a/

[PULL 54/58] vdi: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-22-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vdi.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff -

[PULL 09/58] block: introduce bdrv_open_file_child() helper

2022-10-27 Thread Kevin Wolf
t;file in code: it helps us restrict modifying this field in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-3-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block

[PULL 48/58] block: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-16-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c| 2 +- block/io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[PULL 53/58] qed: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-21-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qed-table.c | 2 +- block/qed.c | 12 ++-- 2 files changed, 7 insertions

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