]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Grow.c
Switch calculations of read_offset and write_offset
[thirdparty/mdadm.git] / Grow.c
diff --git a/Grow.c b/Grow.c
index 0f15e11937bb23a487625a82fa50dc88e5051e16..157ca5801cf89d1c658642b97d072d962c49ddf0 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2313,8 +2313,8 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
         * If we need to suspend more, we limit it to 128M per device, which is
         * rather arbitrary and should be some time-based calculation.
         */
-       write_offset = info->reshape_progress / reshape->before.data_disks;
-       read_offset = info->reshape_progress / reshape->after.data_disks;
+       read_offset = info->reshape_progress / reshape->before.data_disks;
+       write_offset = info->reshape_progress / reshape->after.data_disks;
        write_range = info->new_chunk/512;
        if (advancing) {
                if (read_offset < write_offset + write_range) {