summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-10 17:37:04 +1100
committerNeilBrown <neilb@suse.de>2011-03-10 17:37:04 +1100
commitca6529edf6f7216003863a9ea847e6689693bd96 (patch)
treeed3091b74e94cfec89134b9ed6701fc1c4e8a69e /super1.c
parentc64881d7a2a01e50b2275f5a0a9272bfc953e8a2 (diff)
parentd6508f0cfb60edf07b36f1532eae4d9cddf7178b (diff)
Merge branch 'master' into devel-3.2
Conflicts: Grow.c Manage.c managemon.c mdadm.8.in util.c
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 9299322f..79bb4d0c 100644
--- a/super1.c
+++ b/super1.c
@@ -698,6 +698,20 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
sb->dev_roles[d] = __cpu_to_le16(want);
rv = 1;
}
+ if (info->reshape_active &&
+ sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE) &&
+ info->delta_disks >= 0 &&
+ info->reshape_progress < __le64_to_cpu(sb->reshape_position)) {
+ sb->reshape_position = __cpu_to_le64(info->reshape_progress);
+ rv = 1;
+ }
+ if (info->reshape_active &&
+ sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE) &&
+ info->delta_disks < 0 &&
+ info->reshape_progress > __le64_to_cpu(sb->reshape_position)) {
+ sb->reshape_position = __cpu_to_le64(info->reshape_progress);
+ rv = 1;
+ }
} else if (strcmp(update, "linear-grow-new") == 0) {
unsigned int i;
int rfd, fd;