[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/9] block/mirror: set actively_synced even after the job is read
From: |
Fiona Ebner |
Subject: |
[PATCH 2/9] block/mirror: set actively_synced even after the job is ready |
Date: |
Fri, 24 Feb 2023 15:48:18 +0100 |
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
- [PATCH 0/9] mirror: allow switching from background to active mode, Fiona Ebner, 2023/02/24
- [PATCH 4/9] qapi/block-core: use JobType for BlockJobInfo's type, Fiona Ebner, 2023/02/24
- [PATCH 1/9] blockjob: introduce block-job-change QMP command, Fiona Ebner, 2023/02/24
- [PATCH 2/9] block/mirror: set actively_synced even after the job is ready,
Fiona Ebner <=
- [PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union, Fiona Ebner, 2023/02/24
- [PATCH 3/9] mirror: implement mirror_change method, Fiona Ebner, 2023/02/24
- [PATCH 6/9] blockjob: query driver-specific info via a new 'query' driver method, Fiona Ebner, 2023/02/24
- [PATCH 7/9] mirror: return mirror-specific information upon query, Fiona Ebner, 2023/02/24
- [PATCH 8/9] mirror: return the remaining dirty bytes upon query, Fiona Ebner, 2023/02/24
- [PATCH 9/9] mirror: return the total number of bytes sent upon query, Fiona Ebner, 2023/02/24