summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-10 07:37:04 +0100
committerNeilBrown <neilb@suse.de>2011-03-10 07:37:04 +0100
commitca6529edf6f7216003863a9ea847e6689693bd96 (patch)
treeed3091b74e94cfec89134b9ed6701fc1c4e8a69e /super0.c
parentMan page updates for new --grow options. (diff)
parentManage: be more careful about --add attempts. (diff)
downloadmdadm-ca6529edf6f7216003863a9ea847e6689693bd96.tar.xz
mdadm-ca6529edf6f7216003863a9ea847e6689693bd96.zip
Merge branch 'master' into devel-3.2
Conflicts: Grow.c Manage.c managemon.c mdadm.8.in util.c
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 4f7110d0..3ae236a8 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;