summaryrefslogtreecommitdiff
path: root/super0.c
diff options
context:
space:
mode:
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/super0.c b/super0.c
index 4f7110d..3ae236a 100644
--- a/super0.c
+++ b/super0.c
@@ -503,6 +503,20 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
sb->disks[d].state = info->disk.state | wonly;
rv = 1;
}
+ if (info->reshape_active &&
+ sb->minor_version > 90 && (sb->reshape_position+1) != 0 &&
+ info->delta_disks >= 0 &&
+ info->reshape_progress < sb->reshape_position) {
+ sb->reshape_position = info->reshape_progress;
+ rv = 1;
+ }
+ if (info->reshape_active &&
+ sb->minor_version > 90 && (sb->reshape_position+1) != 0 &&
+ info->delta_disks < 0 &&
+ info->reshape_progress > sb->reshape_position) {
+ sb->reshape_position = info->reshape_progress;
+ rv = 1;
+ }
} else if (strcmp(update, "linear-grow-new") == 0) {
memset(&sb->disks[info->disk.number], 0, sizeof(sb->disks[0]));
sb->disks[info->disk.number].number = info->disk.number;