Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-11 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jul 11, 2024 at 11:44:08AM -0300, Fabiano Rosas wrote: >> But of course, that means we cannot claim to support all kinds of >> forward migrations anymore. Only those in the 6 year period. > > That "6 years" comes from machine type de

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-11 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jul 11, 2024 at 10:34:12AM -0300, Fabiano Rosas wrote: >> Is there an easy way to look at a field and tell in which machine type's >> timeframe it was introduced? > > I am not aware of any. > >> If the machine type of that era has been r

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-11 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 10, 2024 at 06:38:26PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Jul 10, 2024 at 04:48:23PM -0300, Fabiano Rosas wrote: >> >> Peter Xu writes: >> >> >> >> > On Wed, Jul 1

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 10, 2024 at 04:48:23PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Jul 10, 2024 at 01:21:51PM -0300, Fabiano Rosas wrote: >> >> It's not about trust, we simply don't support migrations other than >>

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 10, 2024 at 01:21:51PM -0300, Fabiano Rosas wrote: >> It's not about trust, we simply don't support migrations other than >> n->n+1 and (maybe) n->n-1. So QEMU from 2016 is certainly not included. > > Where does it come from? I thou

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jul 10, 2024 at 11:08:20AM -0300, Fabiano Rosas wrote: >> >> I think it's ok: >> >> >> >> { >> >> "field": "unused", >> >> "version_id": 1, >> >> "fi

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-10 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jul 09, 2024 at 05:38:54PM -0300, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >> > "General command" (GEN_CMD, CMD56) is described as: >> > >> > GEN_CMD is the same as the single block read or wr

Re: [PATCH v3 06/17] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-09 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > "General command" (GEN_CMD, CMD56) is described as: > > GEN_CMD is the same as the single block read or write > commands (CMD24 or CMD17). The difference is that [...] > the data block is not a memory payload data but has a > vendor specific format and

Re: [PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2024-05-22 Thread Fabiano Rosas
Thomas Huth writes: > On 21/05/2024 14.46, Fabiano Rosas wrote: >> Alex Bennée writes: >> >>> Juan Quintela writes: >>> >>>> From: Fabiano Rosas >>>> >>>> Add a smoke test that migrates to a file and gives it to the

Re: [PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2024-05-21 Thread Fabiano Rosas
Alex Bennée writes: > Juan Quintela writes: > >> From: Fabiano Rosas >> >> Add a smoke test that migrates to a file and gives it to the >> script. It should catch the most annoying errors such as changes in >> the ram flags. >> >> After code has

Re: [PATCH 5/6] migration: Rephrase message on failure to save / load Xen device state

2024-05-13 Thread Fabiano Rosas
> saving Xen device state failed > > and > > loading Xen device state failed > > respectively. > > Signed-off-by: Markus Armbruster Acked-by: Fabiano Rosas

[PATCH v3 10/11] block: Convert qmp_query_block and qmp_query_named_block_nodes to coroutine

2024-04-09 Thread Fabiano Rosas
for bdrv_co_block_device_info() can be removed. Signed-off-by: Lin Ma Signed-off-by: Fabiano Rosas --- block.c| 8 block/monitor/block-hmp-cmds.c | 2 +- block/qapi.c | 12 ++-- blockdev.c | 8 hmp-commands

[PATCH v3 07/11] block: Convert bdrv_query_image_info to coroutine

2024-04-09 Thread Fabiano Rosas
are converted. Signed-off-by: Fabiano Rosas --- block/qapi.c | 16 +++- include/block/qapi.h | 8 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 7b1cf48246..5e263960a9 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -304,7

[PATCH v3 05/11] block: Run bdrv_do_query_node_info in a coroutine

2024-04-09 Thread Fabiano Rosas
that would poll or block. (using a mixed wrapper for now, but after all callers are converted, this can become a coroutine exclusively) Signed-off-by: Fabiano Rosas --- - used the coroutine version of the called functions when available --- block/qapi.c | 11 ++- include/block/qapi.h

[PATCH v3 04/11] block: Reschedule query-block during qcow2 invalidation

2024-04-09 Thread Fabiano Rosas
is inconsistent. To avoid failing query-block when all block operations are blocked, unblock the INFO operation at various places. This preserves the prior situations where query-block used to work. 1 - https://gitlab.com/qemu-project/qemu/-/issues/1933 Signed-off-by: Fabiano Rosas --- block.c

[PATCH v3 06/11] block: Convert bdrv_query_block_graph_info to coroutine

2024-04-09 Thread Fabiano Rosas
) bdrv_refresh_filename(), bdrv_get_format_name(), bdrv_get_full_backing_filename(), bdrv_query_snapshot_info_list(), bdrv_get_specific_info(); Signed-off-by: Fabiano Rosas Reviewed-by: Hanna Czenczek --- block/qapi.c | 14 -- include/block/qapi.h | 6 +- qemu-img.c | 3

[PATCH v3 11/11] block: Add a thread-pool version of fstat

2024-04-09 Thread Fabiano Rosas
chance of blocking VCPU threads in case it takes too long to finish. Reviewed-by: Claudio Fontana Reviewed-by: Hanna Czenczek Signed-off-by: João Silva Signed-off-by: Fabiano Rosas --- block/file-posix.c | 40 +--- include/block/raw-aio.h | 4 +++- 2

[PATCH v3 09/11] block: Don't query all block devices at hmp_nbd_server_start

2024-04-09 Thread Fabiano Rosas
hmp_nbd_server_start. This is desirable because we're about to move qmp_query_block into a coroutine and don't need to change the NBD code at the same time. Add the GRAPH_RDLOCK_GUARD_MAINLOOP macro because bdrv_skip_implicit_filters() needs the graph lock. Signed-off-by: Fabiano Rosas --- - add

[PATCH v3 08/11] block: Convert bdrv_block_device_info into co_wrapper

2024-04-09 Thread Fabiano Rosas
caller of bdrv_query_image_info(), so we can remove the wrapper for that function now. Signed-off-by: Fabiano Rosas --- - used co_wrapper_bdrv_rdlock instead of co_wrapper --- block/qapi.c | 10 +- include/block/qapi.h | 13 ++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff

[PATCH v3 03/11] block: Take the graph lock in bdrv_snapshot_list

2024-04-09 Thread Fabiano Rosas
This function has up until now always ran in the main loop, outside of a coroutine. We're about to make it run inside a coroutine so start actually taking the graph lock. Signed-off-by: Fabiano Rosas --- block/snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block

[PATCH v3 02/11] block: Temporarily mark bdrv_co_get_allocated_file_size as mixed

2024-04-09 Thread Fabiano Rosas
Some callers of this function are about to be converted to run in coroutines, so allow it to be executed both inside and outside a coroutine while we convert all the callers. This will be reverted once all callers of bdrv_do_query_node_info run in a coroutine. Signed-off-by: Fabiano Rosas

[PATCH v3 00/11] block: Convert qmp_query_block into a coroutine

2024-04-09 Thread Fabiano Rosas
cussion: https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg03141.html v1: https://lore.kernel.org/r/20230523213903.18418-1-faro...@suse.de v2: https://lore.kernel.org/r/20230609201910.12100-1-faro...@suse.de Fabiano Rosas (9): block: Allow the wrapper script to see functions declared in

[PATCH v3 01/11] block: Allow the wrapper script to see functions declared in qapi.h

2024-04-09 Thread Fabiano Rosas
The following patches will add co_wrapper annotations to functions declared in qapi.h. Add that header to the set of files used by block-coroutine-wrapper.py. Reviewed-by: Hanna Czenczek Signed-off-by: Fabiano Rosas --- block/meson.build | 1 + scripts/block-coroutine

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-03-28 Thread Fabiano Rosas
bibverbs and librdmacm > > Keep the RAM_SAVE_FLAG_HOOK definition since it might appears > in old migration streams. > > Cc: Peter Xu > Cc: Li Zhijian > Acked-by: Fabiano Rosas > Signed-off-by: Philippe Mathieu-Daudé Just to be clear, because people raised the point in the

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-27 Thread Fabiano Rosas
from contrib/. > > Remove PVRDMA device. > > Cc: Peter Xu > Cc: Li Zhijian > Cc: Yuval Shaia > Cc: Marcel Apfelbaum > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Fabiano Rosas

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Fabiano Rosas
id) > > There are more APIs with "iothread" in their names. Subsequent patches > will rename them. There are also comments and documentation that will be > updated in later patches. > > Signed-off-by: Stefan Hajnoczi Acked-by: Fabiano Rosas

Re: [PATCH v2 09/10] block: Convert qmp_query_block() to coroutine_fn

2023-11-29 Thread Fabiano Rosas
Hanna Czenczek writes: > On 09.06.23 22:19, Fabiano Rosas wrote: >> This is another caller of bdrv_get_allocated_file_size() that needs to >> be converted to a coroutine because that function will be made >> asynchronous when called (indirectly) from the QMP dispatcher. &

Re: [PATCH v2 01/12] qemu-file: Don't increment qemu_file_transferred at qemu_file_fill_buffer

2023-10-25 Thread Fabiano Rosas
Juan Quintela writes: > We only call qemu_file_transferred_* on the sending side. Remove the > increment at qemu_file_fill_buffer() and add asserts to > qemu_file_transferred* functions. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 12/12] qemu-file: Make qemu_fflush() return errors

2023-10-24 Thread Fabiano Rosas
>} > > I updated all callers where there is any error check. > qemu_fclose() don't need to check for f->last_error because > qemu_fflush() returns it at the beggining of the function. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 11/12] migration: Remove transferred atomic counter

2023-10-24 Thread Fabiano Rosas
d2bf50614 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -455,7 +455,6 @@ void ram_transferred_add(uint64_t bytes) > } else { > stat64_add(_stats.downtime_bytes, bytes); > } > -stat64_add(_stats.transferred, bytes); > } > > struct MigrationOps { Reviewed-by: Fabiano Rosas

Re: [PATCH 10/12] migration: Use migration_transferred_bytes()

2023-10-24 Thread Fabiano Rosas
newer is better, i.e. exact). > > Notice that this two values are used to: > a - present to the user > b - calculate the rate_limit > > So a few KB here and there is not going to make a difference. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 06/12] qemu-file: Remove _noflush from qemu_file_transferred_noflush()

2023-10-24 Thread Fabiano Rosas
urr_elem = *(void **)curr_elem; > @@ -416,7 +416,7 @@ int vmstate_save_state_v(QEMUFile *f, const > VMStateDescription *vmsd, > return ret; > } > > -written_bytes = qemu_file_transferred_noflush(f) - > old_offset; > +written_bytes = qemu_file_transferred(f) - old_offset; > vmsd_desc_field_end(vmsd, vmdesc_loop, field, written_bytes, > i); > > /* Compressed arrays only care about the first element */ Reviewed-by: Fabiano Rosas

Re: [PATCH 05/12] qemu_file: Remove unused qemu_file_transferred()

2023-10-24 Thread Fabiano Rosas
ile *f) > -{ > -g_assert(qemu_file_is_writable(f)); > -qemu_fflush(f); > -return stat64_get(_stats.qemu_file_transferred); > -} > - > void qemu_put_be16(QEMUFile *f, unsigned int v) > { > qemu_put_byte(f, v >> 8); Reviewed-by: Fabiano Rosas

Re: [PATCH 04/12] migration: Use the number of transferred bytes directly

2023-10-24 Thread Fabiano Rosas
nt64_t qemu_file = qemu_file_transferred(f); > +uint64_t qemu_file = stat64_get(_stats.qemu_file_transferred); > > trace_migration_transferred_bytes(qemu_file, multifd, rdma); > return qemu_file + multifd + rdma; Reviewed-by: Fabiano Rosas

Re: [PATCH 03/12] qemu_file: total_transferred is not used anymore

2023-10-24 Thread Fabiano Rosas
stat64_add(_stats.qemu_file_transferred, size); > } Reviewed-by: Fabiano Rosas

Re: [PATCH 02/12] qemu_file: Use a stat64 for qemu_file_transferred

2023-10-24 Thread Fabiano Rosas
Juan Quintela writes: > This way we can read it from any thread. > I checked that it gives the same value than the current one. We never > use to qemu_files at the same time. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 01/12] qemu-file: We only call qemu_file_transferred_* on the sending side

2023-10-24 Thread Fabiano Rosas
Juan Quintela writes: > Remove the increase in qemu_file_fill_buffer() and add asserts to > qemu_file_transferred* functions. Patch looks ok, but I would rewrite the whole commit message like this: Don't increment qemu_file_transferred at qemu_file_fill_buffer We only call

Re: [PATCH v5 1/7] migration: Print block status when needed

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > The new line was only printed when command options were used. When we > used migration parameters and capabilities, it wasn't. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: >> Juan Quintela writes: >> >>> Fabiano Rosas wrote: >>> D> Juan Quintela writes: >>>> >>>>> From: Fabiano Rosas >>>>> >>>>> Add basic tests for file-

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: > D> Juan Quintela writes: >> >>> From: Fabiano Rosas >>> >>> Add basic tests for file-based migration. >>> >>> Note that we cannot use test_precopy_common because that routine >>&g

Re: [PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Fabiano Rosas
Stefan Hajnoczi writes: > On Mon, 16 Oct 2023 at 13:13, Fabiano Rosas wrote: >> >> Stefan Hajnoczi writes: >> >> > On Mon, 16 Oct 2023 at 06:11, Juan Quintela wrote: >> >> >> >> The following changes since commit >> >> 63011

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-16 Thread Fabiano Rosas
Juan Quintela writes: > From: Fabiano Rosas > > Add basic tests for file-based migration. > > Note that we cannot use test_precopy_common because that routine > expects it to be possible to run the migration live. With the file > transport there is no live migration

Re: [PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Fabiano Rosas
Stefan Hajnoczi writes: > On Mon, 16 Oct 2023 at 06:11, Juan Quintela wrote: >> >> The following changes since commit 63011373ad22c794a013da69663c03f1297a5c56: >> >> Merge tag 'pull-riscv-to-apply-20231012-1' of >> https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 -0400)

Re: [PATCH v4] migration: hold the BQL during setup

2023-10-12 Thread Fabiano Rosas
is removed, because it referred to the qemu_mutex_lock_iothread() > call. > > Signed-off-by: Fiona Ebner Thanks for taking the time to explain stuff in the commit message. I dislike having unnecessary dependencies on the BQL throughout the migration code, but I see people preferred that over conditional locking in the previous versions, so in the name of consensus: Reviewed-by: Fabiano Rosas

[PATCH RESEND 0/2] block/qapi: Dead code cleanup

2023-09-01 Thread Fabiano Rosas
Hi, I'm resending a couple of already reviewed patches that were part of a larger series[1]. Thanks 1- https://lore.kernel.org/r/20230609201910.12100-1-faro...@suse.de Fabiano Rosas (2): block: Remove bdrv_query_block_node_info block: Remove unnecessary variable in bdrv_block_device_info

[PATCH RESEND 1/2] block: Remove bdrv_query_block_node_info

2023-09-01 Thread Fabiano Rosas
The last call site of this function has been removed by commit c04d0ab026 ("qemu-img: Let info print block graph"). Reviewed-by: Claudio Fontana Signed-off-by: Fabiano Rosas --- block/qapi.c | 27 --- include/block/qapi.h | 3 --- 2 files changed, 30

[PATCH RESEND 2/2] block: Remove unnecessary variable in bdrv_block_device_info

2023-09-01 Thread Fabiano Rosas
The commit 5d8813593f ("block/qapi: Let bdrv_query_image_info() recurse") removed the loop where we set the 'bs0' variable, so now it is just the same as 'bs'. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé --- block/qapi.c | 5 ++--- 1 file changed, 2 insert

Re: [PULL v3 1/5] block-migration: Ensure we don't crash during migration cleanup

2023-08-30 Thread Fabiano Rosas
Michael Tokarev writes: > 30.08.2023 14:49, Stefan Hajnoczi wrote: >> From: Fabiano Rosas >> >> We can fail the blk_insert_bs() at init_blk_migration(), leaving the >> BlkMigDevState without a dirty_bitmap and BlockDriverState. Account >> for the possibly mi

Re: [PATCH 2/2] io: follow coroutine AioContext in qio_channel_yield()

2023-08-24 Thread Fabiano Rosas
Stefan Hajnoczi writes: > @@ -2089,10 +2088,6 @@ static void nbd_attach_aio_context(BlockDriverState > *bs, > * the reconnect_delay_timer cannot be active here. > */ > assert(!s->reconnect_delay_timer); > - > -if (s->ioc) { > -qio_channel_attach_aio_context(s->ioc,

[PATCH] block-migration: Ensure we don't crash during migration cleanup

2023-07-31 Thread Fabiano Rosas
95 #2 0x55bbae13 in block_migration_cleanup_bmds () at ../migration/block.c:690 Signed-off-by: Fabiano Rosas --- migration/block.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/migration/block.c b/migration/block.c index b9580a6c7e..86c2256a2b 100644 --- a/migrati

Re: [PATCH v2 00/10] block: Make raw_co_get_allocated_file_size asynchronous

2023-07-03 Thread Fabiano Rosas
Fabiano Rosas writes: > Hi, > > The major change from the last version is that this time I'm moving > all of the callers of bdrv_get_allocated_file_size() into > coroutines. I had to make some temporary changes to avoid asserts > while not all the callers were converted. &

[PATCH v2 09/10] block: Convert qmp_query_block() to coroutine_fn

2023-06-09 Thread Fabiano Rosas
aio_poll anymore; Signed-off-by: Fabiano Rosas --- block.c| 2 +- block/monitor/block-hmp-cmds.c | 2 +- block/qapi.c | 18 +- hmp-commands-info.hx | 1 + include/block/block-hmp-cmds.h | 2 +- include/block/block-io.h | 2

[PATCH v2 05/10] block: Convert bdrv_query_block_graph_info to coroutine

2023-06-09 Thread Fabiano Rosas
) bdrv_refresh_filename(), bdrv_get_format_name(), bdrv_get_full_backing_filename(), bdrv_query_snapshot_info_list(); Signed-off-by: Fabiano Rosas --- block/qapi.c | 12 +++- include/block/qapi.h | 6 +- qemu-img.c | 2 -- 3 files changed, 12 insertions(+), 8 deletions

[PATCH v2 01/10] block: Remove bdrv_query_block_node_info

2023-06-09 Thread Fabiano Rosas
The last call site of this function has been removed by commit c04d0ab026 ("qemu-img: Let info print block graph"). Reviewed-by: Claudio Fontana Signed-off-by: Fabiano Rosas --- block/qapi.c | 27 --- include/block/qapi.h | 3 --- 2 files changed, 30

[PATCH v2 06/10] block: Convert bdrv_block_device_info into co_wrapper

2023-06-09 Thread Fabiano Rosas
cow_bs(), blk_get_public(), throttle_group_get_name(), bdrv_write_threshold_get(), bdrv_query_dirty_bitmaps(), throttle_group_get_config(), bdrv_filter_or_cow_bs(), bdrv_skip_implicit_filters() 2) bdrv_do_query_node_info() (see previous commit); Signed-off-by: Fabiano Rosas --- block/

[PATCH v2 07/10] block: Convert qmp_query_named_block_nodes to coroutine

2023-06-09 Thread Fabiano Rosas
bdrv_block_device_info() -> bdrv_query_image_info() -> bdrv_query_image_info(). The previous patches have determined that bdrv_query_image_info() and bdrv_do_query_node_info() are coroutine-safe so we can just make the QMP command run in a coroutine. Signed-off-by: Lin Ma Signed-off-by: Fabiano

[PATCH v2 00/10] block: Make raw_co_get_allocated_file_size asynchronous

2023-06-09 Thread Fabiano Rosas
into the thread-pool and make the necessary adaptations to ensure raw_co_get_allocated_file_size runs in a coroutine in the block driver aio_context. 1- Question about QMP and BQL https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg03141.html Fabiano Rosas (8): block: Remove

[PATCH v2 04/10] block: Temporarily mark bdrv_co_get_allocated_file_size as mixed

2023-06-09 Thread Fabiano Rosas
Some callers of this function are about to be converted to run in coroutines, so allow it to be executed both inside and outside a coroutine while we convert all the callers. This will be reverted once all callers of bdrv_do_query_node_info run in a coroutine. Signed-off-by: Fabiano Rosas

[PATCH v2 03/10] block: Allow the wrapper script to see functions declared in qapi.h

2023-06-09 Thread Fabiano Rosas
The following patches will add co_wrapper annotations to functions declared in qapi.h. Add that header to the set of files used by block-coroutine-wrapper.py. Signed-off-by: Fabiano Rosas --- block/meson.build | 1 + scripts/block-coroutine-wrapper.py | 1 + 2 files changed, 2

[PATCH v2 08/10] block: Don't query all block devices at hmp_nbd_server_start

2023-06-09 Thread Fabiano Rosas
hmp_nbd_server_start. This is desirable because we're about to move qmp_query_block into a coroutine and don't need to change the NBD code at the same time. Signed-off-by: Fabiano Rosas --- block/monitor/block-hmp-cmds.c | 20 1 file changed, 12 insertions(+), 8 deletions

[PATCH v2 02/10] block: Remove unnecessary variable in bdrv_block_device_info

2023-06-09 Thread Fabiano Rosas
The commit 5d8813593f ("block/qapi: Let bdrv_query_image_info() recurse") removed the loop where we set the 'bs0' variable, so now it is just the same as 'bs'. Signed-off-by: Fabiano Rosas --- block/qapi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bloc

[PATCH v2 10/10] block: Add a thread-pool version of fstat

2023-06-09 Thread Fabiano Rosas
chance of blocking VCPU threads in case it takes too long to finish. Reviewed-by: Claudio Fontana Signed-off-by: João Silva Signed-off-by: Fabiano Rosas --- block/file-posix.c | 40 +--- include/block/raw-aio.h | 4 +++- 2 files changed, 40 insertions

Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > This was the only caller for read only files. So change the test for > an assert in qemu_fflush(). > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 03/16] migration: Use qemu_file_transferred_noflush() for block migration.

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > We only care about the amount of bytes transferred. Flushing is done > by the system somewhere else. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 13/16] qemu-file: Simplify qemu_file_get_error()

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > If we pass a NULL error is the same that returning dirrectly the value. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 10/16] qemu-file: Remove _noflush from qemu_file_transferred_noflush()

2023-05-30 Thread Fabiano Rosas
Juan Quintela writes: > qemu_file_transferred() don't exist anymore, so we can reuse the name. > > Signed-off-by: Juan Quintela > --- > migration/qemu-file.h | 4 ++-- > migration/block.c | 4 ++-- > migration/qemu-file.c | 2 +- > migration/savevm.c| 6 +++--- > migration/vmstate.c

Re: [RFC PATCH 5/6] block: Allow bdrv_get_allocated_file_size to run in bdrv context

2023-05-29 Thread Fabiano Rosas
Kevin Wolf writes: > Am 23.05.2023 um 23:39 hat Fabiano Rosas geschrieben: >> We're about to move calls to 'fstat' into the thread-pool to avoid >> blocking VCPU threads should the system call take too long. >> >> To achieve that we first need to make sure none o

Re: [RFC PATCH 6/6] block: Add a thread-pool version of fstat

2023-05-26 Thread Fabiano Rosas
Eric Blake writes: > On Tue, May 23, 2023 at 06:39:03PM -0300, Fabiano Rosas wrote: >> From: João Silva >> >> The fstat call can take a long time to finish when running over >> NFS. Add a version of it that runs in the thread pool. >> >> Adapt one of it

Re: [RFC PATCH 3/6] Convert query-block/info_block to coroutine

2023-05-26 Thread Fabiano Rosas
Eric Blake writes: > On Tue, May 23, 2023 at 06:39:00PM -0300, Fabiano Rosas wrote: >> From: Lin Ma >> >> Sometimes the query-block performs time-consuming I/O(say waiting for >> the fstat of NFS complete), So let's make this QMP handler runs in a >> c

Re: [RFC PATCH 4/6] Convert query-block/info_block to coroutine

2023-05-24 Thread Fabiano Rosas
Lin Ma writes: > The commit title/message are duplicated to previous one, Here should > use "query-named-block-nodes" instead. > > Lin > Ugh, what a blunder, they're even nicely aligned in the git log. I'll fix it in the next version. Thanks!

[RFC PATCH 1/6] block: Remove bdrv_query_block_node_info

2023-05-23 Thread Fabiano Rosas
The last call site of this function has been removed by commit c04d0ab026 ("qemu-img: Let info print block graph"). Signed-off-by: Fabiano Rosas --- block/qapi.c | 27 --- include/block/qapi.h | 3 --- 2 files changed, 30 deletions(-) diff --git a/bl

[RFC PATCH 2/6] block: Mark bdrv_co_get_allocated_file_size() as mixed

2023-05-23 Thread Fabiano Rosas
Some callers of this function are about to be converted to use coroutines, so allow it to be executed both inside and outside a coroutine. Signed-off-by: Fabiano Rosas --- include/block/block-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block-io.h b

[RFC PATCH 3/6] Convert query-block/info_block to coroutine

2023-05-23 Thread Fabiano Rosas
From: Lin Ma Sometimes the query-block performs time-consuming I/O(say waiting for the fstat of NFS complete), So let's make this QMP handler runs in a coroutine. The following patch moves the fstat() into a thread pool. Signed-off-by: Lin Ma Signed-off-by: Fabiano Rosas --- block/monitor

[RFC PATCH 0/6] block: Make raw_co_get_allocated_file_size asynchronous

2023-05-23 Thread Fabiano Rosas
- Question about QMP and BQL https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg03141.html CI run: https://gitlab.com/farosas/qemu/-/pipelines/876583685 Fabiano Rosas (3): block: Remove bdrv_query_block_node_info block: Mark bdrv_co_get_allocated_file_size() as mixed block: Allow

[RFC PATCH 6/6] block: Add a thread-pool version of fstat

2023-05-23 Thread Fabiano Rosas
chance of blocking VCPU threads in case it takes too long to finish. Signed-off-by: João Silva Signed-off-by: Fabiano Rosas --- block/file-posix.c | 40 +--- include/block/raw-aio.h | 4 +++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git

[RFC PATCH 5/6] block: Allow bdrv_get_allocated_file_size to run in bdrv context

2023-05-23 Thread Fabiano Rosas
in a deadlock when the qemu_global_mutex is released and another thread tries to acquire the aio_context. Signed-off-by: Fabiano Rosas --- block/qapi.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/block/qapi.c b/block/qapi.c index ae6cd1c2ff..cd197abf1f

[RFC PATCH 4/6] Convert query-block/info_block to coroutine

2023-05-23 Thread Fabiano Rosas
From: Lin Ma Sometimes the query-block performs time-consuming I/O(say waiting for the fstat of NFS complete), So let's make this QMP handler runs in a coroutine. The following patch moves the fstat() into a thread pool. Signed-off-by: Lin Ma Signed-off-by: Fabiano Rosas --- blockdev.c

Re: [PATCH v2 4/6] tests/qtest: make more migration pre-copy scenarios run non-live

2023-04-24 Thread Fabiano Rosas
Daniel P. Berrangé writes: > There are 27 pre-copy live migration scenarios being tested. In all of > these we force non-convergance and run for one iteration, then let it > converge and wait for completion during the second (or following) > iterations. At 3 mbps bandwidth limit the first

Re: [PATCH v2 30/43] migration: Create migrate_max_bandwidth() function

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 29/43] migration: Move migrate_postcopy() to options.c

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 28/43] migration: Move migrate_use_tls() to options.c

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Once there, rename it to migrate_tls() and make it return bool for > consistency. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 9 - > migration/migration.h | 2 -- > migration/options.c | 16 +++- > migration/options.h | 9

Re: [PATCH v2 27/43] migration: Create migrate_cpu_throttle_tailslow() function

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 26/43] migration: Create migrate_cpu_throttle_increment() function

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 25/43] migration: Create migrate_cpu_throttle_initial() to option.c

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 24/43] migration: Move migrate_announce_params() to option.c

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas > --- > migration/migration.c | 14 -- > migration/options.c | 19 +++ > 2 files changed, 19 insertions(+), 14 deletions(-) > > diff --git a/migration/mi

Re: [PATCH v2 23/43] migration: Create migrate_max_cpu_throttle()

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 22/43] migration: Create migrate_checkpoint_delay()

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH v2 21/43] migration: Create migrate_throttle_trigger_threshold()

2023-04-20 Thread Fabiano Rosas
uint64_t threshold = migrate_throttle_trigger_threshold(); > uint64_t bytes_xfer_period = > stat64_get(_counters.transferred) - rs->bytes_xfer_prev; > uint64_t bytes_dirty_period = rs->num_dirty_pages_period * > TARGET_PAGE_SIZE; Reviewed-by: Fabiano Rosas

Re: [PATCH v2 13/43] migration: Create migrate_rdma_pin_all() function

2023-04-20 Thread Fabiano Rosas
Juan Quintela writes: > Signed-off-by: Juan Quintela > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > migration/options.c | 7 +++ > migration/options.h | 1 + > migration/rdma.c| 6 +++--- > 3 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/migration/options.c

Re: [PATCH v2 03/43] migration: Create migration_cap_set()

2023-04-20 Thread Fabiano Rosas
gt; new_state) > } > } > > -static MigrationCapabilityStatus *migrate_cap_add(MigrationCapability index, > - bool state) > +static bool migrate_cap_set(int cap, bool value, Error **errp) Just a nit, the commit message says migration_cap_set. Reviewed-by: Fabiano Rosas

[PATCH v3 11/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-13 Thread Fabiano Rosas
Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54e62b..eaf13c7a33

[PATCH v2 11/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-08 Thread Fabiano Rosas
Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54e62b..eaf13c7a33

Re: random copy-before-write iotest failure

2023-02-07 Thread Fabiano Rosas
Peter Maydell writes: > This is on ppc64 (big-endian), a random failure > (it was while testing the riscv pullreq, but that doesn't touch > any of the block stuff): > > 616/635 qemu:block / qemu-iotests qcow2 >ERROR > 101.88s exit status 1 >

[PATCH 10/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-06 Thread Fabiano Rosas
Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54e62b..eaf13c7a33 100755 --- a/tests/qemu

Re: [PATCH] block/io: Check for replay-enabled in bdrv_drain_all_begin()

2022-12-20 Thread Fabiano Rosas
a 'make check-avocado': the > tests/avocado/reverse_debugging.py:ReverseDebugging_X86_64.test_x86_64_pc > tests/avocado/reverse_debugging.py:ReverseDebugging_AArch64.test_aarch64_virt > tests were both broken by this. > > Fixes: da0bd744344adb1f285 ("block: Factor out bdrv_drain_all_begin_nopoll()") > Signed-off-by: Peter Maydell Tested-by: Fabiano Rosas

Re: [PULL v3 00/50] Block layer patches

2022-12-19 Thread Fabiano Rosas
Kevin Wolf writes: > The following changes since commit 48804eebd4a327e4b11f902ba80a00876ee53a43: > > Merge tag 'pull-misc-2022-12-14' of https://repo.or.cz/qemu/armbru into > staging (2022-12-15 10:13:46 +) > > are available in the Git repository at: > >

Re: [PATCH v2 3/3] ui: remove deprecated 'password' option for SPICE

2022-12-16 Thread Fabiano Rosas
Daniel P. Berrangé writes: > This has been replaced by the 'password-secret' option, > which references a 'secret' object instance. > > Reviewed-by: Markus Armbruster > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas Just a small detail below. >

Re: [PATCH v2 2/3] block: deprecate iSCSI 'password' in favour of 'password-secret'

2022-12-16 Thread Fabiano Rosas
via QCryptoSecret API > > The existing 'password' option is overdue for deprecation and > subsequent removal. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH v2 1/3] block: mention 'password-secret' option for -iscsi

2022-12-16 Thread Fabiano Rosas
via QCryptoSecret API > > but was not mentioned in the command line docs > > Reviewed-by: Markus Armbruster > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH 1/3] block: mention 'password-secret' option for -iscsi

2022-12-01 Thread Fabiano Rosas
Daniel P. Berrangé writes: > The 'password-secret' option was added > > commit b189346eb1784df95ed6fed610411dbf23d19e1f > Author: Daniel P. Berrangé > Date: Thu Jan 21 14:19:21 2016 + > > iscsi: add support for getting CHAP password via QCryptoSecret API > > but was not

  1   2   >