[PATCH] block/io_uring: add missing include file

2022-07-20 Thread Jinhao Fan
The commit "Use io_uring_register_ring_fd() to skip fd operations" uses warn_report but did not include the header file "qemu/error-report.h". This causes "error: implicit declaration of function ‘warn_report’". Include this header file. Signed-off-by: Jinhao Fan --- block/io_uring.c | 1 + 1 fi

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 20/07/2022 um 15:06 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: >>> >>> That made me ask: >>> >>> 1. Are all tests always run in main loop? If yes, why to protect status >>> r

Re: [RFC PATCH 3/8] RFC: block: use transactions as a replacement of ->{can_}set_aio_context()

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/13/22 00:19, Emanuele Giuseppe Esposito wrote: +/* + * @visited will accumulate all visited BdrvChild object. The caller is + * responsible for freeing the list afterwards. + */ +bool bdrv_change_aio_context(BlockDriverState *bs, AioContext *ctx, + GSList **visite

Re: [PATCH v9 19/21] blockjob: protect iostatus field in BlockJob struct

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 20/07/2022 um 15:15 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 16:07, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 16:51 schrieb Vladimir Sementsov-Ogievskiy: >>> On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) tha

Re: [RFC PATCH 2/8] transactions: add tran_add_back

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/18/22 19:20, Paolo Bonzini wrote: On 7/14/22 17:13, Hanna Reitz wrote: that we want to run before the others but still only when invoking finalize/commit/abort. I don’t understand this yet (but perhaps it’ll become clearer with the following patches); doesn’t the new function do the oppo

Re: [PATCH v9 19/21] blockjob: protect iostatus field in BlockJob struct

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 16:07, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 16:51 schrieb Vladimir Sementsov-Ogievskiy: On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_ST

Re: [PATCH v9 11/21] jobs: group together API calls under the same job lock

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:40, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:26 schrieb Vladimir Sementsov-Ogievskiy:   }     static bool child_job_drained_poll(BdrvChild *c) @@ -111,8 +113,10 @@ static bool child_job_drained_poll(BdrvChild *c)   /* An inactive or completed job doesn't have

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: That made me ask: 1. Are all tests always run in main loop? If yes, why to protect status reading in test_complete_in_standby() ? 2. Maybe, we don't need to protect anything here

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 19/07/2022 um 20:07 schrieb Paolo Bonzini: > On 7/19/22 11:57, Emanuele Giuseppe Esposito wrote: >> >> Wrapping the new drains in aio_context_acquire/release(new_context) is >> not so much helpful either, since apparently the following >> blk_set_aio_context makes aio_poll() hang. >> I am not