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: [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: [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 mea

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 write

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, >> >> &qu

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 fro

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-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 10, 2

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 b

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: (subset) [PATCH v2 08/15] migration: Free removed SaveStateEntry

2024-08-02 Thread Fabiano Rosas
On Thu, 27 Jun 2024 22:37:51 +0900, Akihiko Odaki wrote: > This fixes LeakSanitizer warnings. > > Queued, thanks!

Re: Issue with QEMU Live Migration

2024-08-21 Thread Fabiano Rosas
"Arisetty, Chakri" writes: > Hello, > > I’m having trouble with live migration and I’m using QEMU 7.2.0 on Debian 11. > > Migration state switches to pre-switchover state during the RAM migration. > > My assumption is that disks are already migrated and there are no further > dirty pages to be t

Re: Issue with QEMU Live Migration

2024-08-22 Thread Fabiano Rosas
QEMU to know if the disk transfer is completed and stop > dirty pages being transferred? Sorry, I can't help here. We have block layer people in CC, they might be able to advise. > > Thanks > Chakri > > > On

Re: [PATCH v4 1/7] migration: Free removed SaveStateEntry

2024-08-23 Thread Fabiano Rosas
Akihiko Odaki writes: > This fixes LeakSanitizer warnings. > > Signed-off-by: Akihiko Odaki > Reviewed-by: Peter Xu > Reviewed-by: Michael S. Tsirkin > --- > migration/savevm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/migration/savevm.c b/migration/savevm.c > index deb57833f

Re: Issue with QEMU Live Migration

2024-08-23 Thread Fabiano Rosas
ffbe40 in_flight: 0 > bytes_in_flight: 0 dirty count 2162688 active_write_bytes_in_flight 0 total > 5371002880 current 5368840192 deltla 1547585 iostatus 0 > .. > > > RAM migration to enter 'completion' state from 'pre-switchover' takes a very > long time for

Re: [PATCH v4 7/7] tests/qtest: Delete previous boot file

2024-08-27 Thread Fabiano Rosas
Thomas Huth writes: > On 26/08/2024 17.26, Peter Xu wrote: >> On Fri, Aug 23, 2024 at 03:13:12PM +0900, Akihiko Odaki wrote: >>> A test run may create boot files several times. Delete the previous boot >>> file before creating a new one. >>> >>> Signed-off-by: Akihiko Odaki >>> Reviewed-by: Mich

Re: [PATCH v4 7/7] tests/qtest: Delete previous boot file

2024-08-27 Thread Fabiano Rosas
Peter Maydell writes: > On Tue, 27 Aug 2024 at 15:03, Fabiano Rosas wrote: >> >> Thomas Huth writes: >> >> > On 26/08/2024 17.26, Peter Xu wrote: >> >> On Fri, Aug 23, 2024 at 03:13:12PM +0900, Akihiko Odaki wrote: >> >>> A test run may

Re: [PATCH 08/39] migration: replace assert(0) with g_assert_not_reached()

2024-09-10 Thread Fabiano Rosas
n/ram.c > +++ b/migration/ram.c > @@ -1765,19 +1765,19 @@ bool ram_write_tracking_available(void) > > bool ram_write_tracking_compatible(void) > { > -assert(0); > +g_assert_not_reached(); > return false; > } > > int ram_write_tracking_start(void) > { > -assert(0); > +g_assert_not_reached(); > return -1; > } > > void ram_write_tracking_stop(void) > { > -assert(0); > +g_assert_not_reached(); > } > #endif /* defined(__linux__) */ Reviewed-by: Fabiano Rosas

Re: [PATCH 21/39] migration: replace assert(false) with g_assert_not_reached()

2024-09-10 Thread Fabiano Rosas
le */ > return 0; > } > } You could drop the comment that's now redundant. Reviewed-by: Fabiano Rosas

[Qemu-block] [PATCH v2 0/5] block: Ensure non-protocol drivers can only be selected explicitly

2018-03-12 Thread Fabiano Rosas
ocumentation was added to make the above more explicit. v1 -> v2: - patch 1: updated commit message - patch 5: improved protocol_name documentation https://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg02998.html Fabiano Rosas (5): block/replication: Remove protocol_name field block

[Qemu-block] [PATCH v2 1/5] block/replication: Remove protocol_name field

2018-03-12 Thread Fabiano Rosas
attempts to invoke this driver using protocol syntax will fail gracefully: $ qemu-img info replication:foo qemu-img: Could not open 'replication:': Unknown protocol 'replication' Buglink: https://bugs.launchpad.net/qemu/+bug/1726733 Signed-off-by: Fabiano Rosas Reviewed-by: M

[Qemu-block] [PATCH v2 5/5] include/block/block_int: Document protocol related functions

2018-03-12 Thread Fabiano Rosas
Clarify that: - for protocols the brdv_file_open function is used instead of bdrv_open; - when protocol_name is set, a driver should expect to be given only a filename and no other options. Signed-off-by: Fabiano Rosas --- include/block/block_int.h | 8 1 file changed, 8 insertions

[Qemu-block] [PATCH v2 3/5] block/throttle: Remove protocol-related fields

2018-03-12 Thread Fabiano Rosas
'throttle:foo': Unknown protocol 'throttle' Signed-off-by: Fabiano Rosas Reviewed-by: Max Reitz --- block/throttle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/throttle.c b/block/throttle.c index 5f4d43d0fc..95ed06acd8 100644 --- a/block/throttle.c ++

[Qemu-block] [PATCH v2 4/5] block/blkreplay: Remove protocol-related fields

2018-03-12 Thread Fabiano Rosas
'blkreplay:foo': Unknown protocol 'blkreplay' Signed-off-by: Fabiano Rosas Reviewed-by: Pavel Dovgalyuk Reviewed-by: Max Reitz --- block/blkreplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c index 61e44a1949..fe5a9b4a9

[Qemu-block] [PATCH v2 2/5] block/quorum: Remove protocol-related fields

2018-03-12 Thread Fabiano Rosas
m:foo': Unknown protocol 'quorum' Signed-off-by: Fabiano Rosas Reviewed-by: Max Reitz --- block/quorum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 14333c18aa..cfe484a945 100644 --- a/block/quorum.c +++ b/block/quorum.c

Re: [Qemu-block] [Qemu-devel] [PATCH 5/5] include/block/block_int: Document protocol related functions

2018-03-12 Thread Fabiano Rosas
On 2018-03-12 10:50, Max Reitz wrote: > A driver doesn't need to be a protocol driver for this, and technically > a protocol driver doesn't need to set this. Maybe we should rename it > to "filename_prefix"...? Yes, something that is closer to the filename string and farther from the notion of w

[Qemu-block] [PATCH 5/5] include/block/block_int: Document protocol related functions

2018-03-09 Thread Fabiano Rosas
Clarify that for protocols the brdv_file_open function is used instead of bdrv_open and that protocol_name is expected to be set. Signed-off-by: Fabiano Rosas --- include/block/block_int.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/block/block_int.h b/include/block

[Qemu-block] [PATCH 2/5] block/quorum: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
m:foo': Unknown protocol 'quorum' Signed-off-by: Fabiano Rosas --- block/quorum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 14333c18aa..cfe484a945 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -1098,11 +10

[Qemu-block] [PATCH 1/5] block/replication: Remove protocol_name field

2018-03-09 Thread Fabiano Rosas
gracefully: $ qemu-img info replication:foo qemu-img: Could not open 'replication:': Unknown protocol 'replication' Buglink: https://bugs.launchpad.net/qemu/+bug/1726733 Signed-off-by: Fabiano Rosas --- block/replication.c | 1 - replication.h | 1 - 2 files changed,

[Qemu-block] [PATCH 0/5] block: Ensure non-protocol drivers can only be selected explicitly

2018-03-09 Thread Fabiano Rosas
ocumentation was added to make the above more explicit. Fabiano Rosas (5): block/replication: Remove protocol_name field block/quorum: Remove protocol-related fields block/throttle: Remove protocol-related fields block/blkreplay: Remove protocol-related fields include/block/block_i

[Qemu-block] [PATCH 4/5] block/blkreplay: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
'blkreplay:foo': Unknown protocol 'blkreplay' Signed-off-by: Fabiano Rosas --- block/blkreplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c index 61e44a1949..fe5a9b4a98 100755 --- a/block/blkreplay.c +++ b/block/blkreplay

[Qemu-block] [PATCH 3/5] block/throttle: Remove protocol-related fields

2018-03-09 Thread Fabiano Rosas
'throttle:foo': Unknown protocol 'throttle' Signed-off-by: Fabiano Rosas --- block/throttle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/throttle.c b/block/throttle.c index 5f4d43d0fc..95ed06acd8 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -215

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 mentioned

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

2022-12-16 Thread Fabiano Rosas
ryptoSecret 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 v2 2/3] block: deprecate iSCSI 'password' in favour of 'password-secret'

2022-12-16 Thread Fabiano Rosas
ptoSecret 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 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

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: > > https://repo.or.cz/qemu/kevin.gi

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

[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: 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 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

[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

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

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 b/mi

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

2023-04-20 Thread Fabiano Rosas
t64_t threshold = migrate_throttle_trigger_threshold(); > uint64_t bytes_xfer_period = > stat64_get(&ram_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 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 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 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 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 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 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 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 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 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 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 iterati

[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 --- block

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

2023-05-23 Thread Fabiano Rosas
uld result 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 ae6cd1c

[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 a

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

2023-05-23 Thread Fabiano Rosas
ck driver aio_context. 1- 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(

[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/mo

[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 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

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!

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 >&

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 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

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: [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 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 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

[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

[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(-

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

2023-06-09 Thread Fabiano Rosas
from 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(

[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 00/10] block: Make raw_co_get_allocated_file_size asynchronous

2023-06-09 Thread Fabiano Rosas
unning. Move the 'fstat' call 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.

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

2023-06-09 Thread Fabiano Rosas
rough 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: Fa

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

2023-06-09 Thread Fabiano Rosas
bdrv_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 --- b

[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 05/10] block: Convert bdrv_query_block_graph_info to coroutine

2023-06-09 Thread Fabiano Rosas
); 2) 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 dele

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

2023-06-09 Thread Fabiano Rosas
esn't call 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-

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.

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 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Fabiano Rosas
) > > 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-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-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-03-28 Thread Fabiano Rosas
erbs 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

[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

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

2024-04-09 Thread Fabiano Rosas
nel.org/r/87bk6trl9i@suse.de Initial discussion: 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

[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 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/

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

2024-04-09 Thread Fabiano Rosas
y 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(-)

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

2024-04-09 Thread Fabiano Rosas
from 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 R

[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 06/11] block: Convert bdrv_query_block_graph_info to coroutine

2024-04-09 Thread Fabiano Rosas
); 2) 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

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

2024-04-09 Thread Fabiano Rosas
w2State 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 --

[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/q

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

2024-04-09 Thread Fabiano Rosas
s 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 @@ -

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

2024-04-09 Thread Fabiano Rosas
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

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

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

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

2023-07-31 Thread Fabiano Rosas
095 #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/mig

  1   2   >