Re: [PATCH 0/9] parallels: Refactor the code of images checks and fix a bug

2022-08-19 Thread Denis V. Lunev
On 18.08.2022 17:14, Alexander Ivanov wrote: Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. v4 changes: M

Re: [PATCH 9/9] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2022-08-19 Thread Denis V. Lunev
On 18.08.2022 17:14, Alexander Ivanov wrote: Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov --- block/parallels.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/blo

Re: [PATCH 6/9] parallels: Move check of cluster outside image to a separate function

2022-08-19 Thread Denis V. Lunev
On 18.08.2022 17:14, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. s->data_end fix relates to out-of-image check so move it to the helper too. Signed-off-by: Alex

Re: [PATCH 2/9] parallels: Fix data_end field value in parallels_co_check()

2022-08-19 Thread Denis V. Lunev
On 18.08.2022 17:14, Alexander Ivanov wrote: When an image is opened for check there is no error if an offset in the BAT points outside the image. In such a way we can repair the image. Out-of-image offsets are repaired in the check, but data_end field still points outside. Fix this field by file

Re: [PATCH 1/2] block: use bdrv_is_sg() helper instead of raw bs->sg reading

2022-08-19 Thread Vladimir Sementsov-Ogievskiy
On 8/17/22 11:37, Denis V. Lunev wrote: I believe that if the helper exists, it must be used always for reading of the value. It breaks expectations in the other case. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC: Fam Zheng CC: Ronnie Sahlberg CC: Paolo Bon

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-08-19 Thread Vladimir Sementsov-Ogievskiy
On 8/18/22 10:46, Emanuele Giuseppe Esposito wrote: Am 17/08/2022 um 20:54 schrieb Vladimir Sementsov-Ogievskiy: On 8/16/22 15:52, Emanuele Giuseppe Esposito wrote:    } @@ -501,8 +481,12 @@ void job_unref_locked(Job *job)> assert(!job->txn);      if (job->driver->free) { + 

Re: [PATCH 2/2] block: make serializing requests functions 'void'

2022-08-19 Thread Vladimir Sementsov-Ogievskiy
On 8/17/22 11:37, Denis V. Lunev wrote: Return codes of the following functions are never used in the code: * bdrv_wait_serialising_requests_locked * bdrv_wait_serialising_requests * bdrv_make_request_serialising Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Stefan Hajnoczi CC

Re: [PATCH 1/2] block: pass OnOffAuto instead of bool to block_acct_setup()

2022-08-19 Thread Vladimir Sementsov-Ogievskiy
On 8/17/22 12:28, Denis V. Lunev wrote: We would have one more place for block_acct_setup() calling, which should not corrupt original value. Signed-off-by: Denis V. Lunev CC: Peter Krempa CC: Markus Armbruster CC: John Snow CC: Kevin Wolf CC: Hanna Reitz CC: Vladimir Sementsov-Ogievskiy

[RFC PATCH] qemu-options: try and clarify preferred block semantics

2022-08-19 Thread Alex Bennée
Try to correct any confusion about QEMU's Byzantine disk options by laying out the preferred "modern" options as-per: " (best: -device + -blockdev, 2nd obsolete syntax: -device + -drive, 3rd obsolete syntax: -drive, 4th obsolete syntax: -hdNN)" Signed-off-by: Alex Bennée Cc: qemu-block@