diff options
| author | Eric Blake <eblake@redhat.com> | 2025-05-09 15:40:24 -0500 |
|---|---|---|
| committer | Eric Blake <eblake@redhat.com> | 2025-05-14 16:53:26 -0500 |
| commit | 9474d97bd7421b4fe7c806ab0949697514d11e88 (patch) | |
| tree | 9375768a27d7fe58e5a722ceda58845fea3300d1 /tests/unit/test-block-iothread.c | |
| parent | 870f8963cf1a84f8ec929b05a6d68906974a76c5 (diff) | |
| download | focaccia-qemu-9474d97bd7421b4fe7c806ab0949697514d11e88.tar.gz focaccia-qemu-9474d97bd7421b4fe7c806ab0949697514d11e88.zip | |
mirror: Pass full sync mode rather than bool to internals
Out of the five possible values for MirrorSyncMode, INCREMENTAL and BITMAP are already rejected up front in mirror_start, leaving NONE, TOP, and FULL as the remaining values that the code was collapsing into a single bool is_none_mode. Furthermore, mirror_dirty_init() is only reachable for modes TOP and FULL, as further guided by s->zero_target. However, upcoming patches want to further optimize the pre-zeroing pass of a sync=full mirror in mirror_dirty_init(), while avoiding that pass on a sync=top action. Instead of throwing away context by collapsing these two values into s->is_none_mode=false, it is better to pass s->sync_mode throughout the entire operation. For active commit, the desired semantics match sync mode TOP. Signed-off-by: Eric Blake <eblake@redhat.com> Message-ID: <20250509204341.3553601-22-eblake@redhat.com> Reviewed-by: Sunny Zhu <sunnyzhyy@qq.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/unit/test-block-iothread.c')
0 files changed, 0 insertions, 0 deletions