[PATCH 2/9] block/mirror: set actively_synced even after the job is ready

Fiona Ebner posted 9 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH 2/9] block/mirror: set actively_synced even after the job is ready
Posted by Fiona Ebner 2 years, 2 months ago
In preparation to allow switching from background to active mode. This
ensures that setting actively_synced will not be missed when the
switch happens after the job is ready.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 block/mirror.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/mirror.c b/block/mirror.c
index ab326b67c9..ca87492fcc 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1046,9 +1046,9 @@ static int coroutine_fn mirror_run(Job *job, Error **errp)
                  * the target in a consistent state.
                  */
                 job_transition_to_ready(&s->common.job);
-                if (s->copy_mode != MIRROR_COPY_MODE_BACKGROUND) {
-                    s->actively_synced = true;
-                }
+            }
+            if (s->copy_mode != MIRROR_COPY_MODE_BACKGROUND) {
+                s->actively_synced = true;
             }
 
             should_complete = s->should_complete ||
-- 
2.30.2
Re: [PATCH 2/9] block/mirror: set actively_synced even after the job is ready
Posted by Vladimir Sementsov-Ogievskiy 2 years, 2 months ago
On 24.02.23 17:48, Fiona Ebner wrote:
> In preparation to allow switching from background to active mode. This
> ensures that setting actively_synced will not be missed when the
> switch happens after the job is ready.
> 
> Signed-off-by: Fiona Ebner<f.ebner@proxmox.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>

-- 
Best regards,
Vladimir