summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ReadMe.c6
-rw-r--r--super-ddf.c9
-rw-r--r--super0.c14
-rw-r--r--super1.c14
4 files changed, 38 insertions, 5 deletions
diff --git a/ReadMe.c b/ReadMe.c
index fb778ec2..90cab871 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -86,11 +86,11 @@ char Version[] = Name " - v3.2 DEVELOPER_ONLY - 1st February 2011 (USE WITH CARE
* At the time if writing, there is only minimal support.
*/
-char short_options[]="-ABCDEFGIQhVXWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
+char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
char short_bitmap_options[]=
- "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
+ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:";
char short_bitmap_auto_options[]=
- "-ABCDEFGIQhVXWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
+ "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:";
struct option long_options[] = {
{"manage", 0, 0, ManageOpt},
diff --git a/super-ddf.c b/super-ddf.c
index 41ff0053..41f5264e 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2972,18 +2972,23 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray
for (i = 0 ; i < ddf->mppe ; i++) {
struct mdinfo *dev;
struct dl *d;
+ int stt;
if (vc->conf.phys_refnum[i] == 0xFFFFFFFF)
continue;
- this->array.working_disks++;
-
for (d = ddf->dlist; d ; d=d->next)
if (d->disk.refnum == vc->conf.phys_refnum[i])
break;
if (d == NULL)
/* Haven't found that one yet, maybe there are others */
continue;
+ stt = __be16_to_cpu(ddf->phys->entries[d->pdnum].state);
+ if ((stt & (DDF_Online|DDF_Failed|DDF_Rebuilding))
+ != DDF_Online)
+ continue;
+
+ this->array.working_disks++;
dev = malloc(sizeof(*dev));
memset(dev, 0, sizeof(*dev));
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;
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;