On Fri, 9 May 2025 15:40:24 -0500, Eric Blake wrote:
> 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 <ebl...@redhat.com>
> 
> ---
> 
> v4: new patch
> ---
>  block/mirror.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)

Reviewed-by: Sunny Zhu <sunnyz...@qq.com>


Reply via email to